php-general Digest 23 Sep 2011 08:29:47 -0000 Issue 7491
Topics (messages 314977 through 315002):
Re: How can I check for characters in a $_POST[] variable?
314977 by: Nilesh Govindarajan
314978 by: Tommy Pham
314979 by: Eric
314980 by: Igor Escobar
314981 by: Igor Escobar
314982 by: Marco Lanzotti
314983 by: Shawn McKenzie
314985 by: Nilesh Govindarajan
314987 by: Robert Williams
314989 by: Nilesh Govindarajan
314995 by: Robert Williams
Re:
314984 by: Eric
314986 by: Igor Escobar
314992 by: Tommy Pham
PHP process 32 v 64 bit virtual memory
314988 by: James
What determines your use of the type of DB framework/abstract?
314990 by: Jamie Krasnoo
314993 by: Jamie Krasnoo
314997 by: Lester Caine
314998 by: Paul M Foster
Any free online tests to test my PHP knowledge?
314991 by: Mike Hansen
314994 by: George Langley
314996 by: Mike Hansen
314999 by: Paul M Foster
315000 by: Paul Halliday
315001 by: Ross Hansen
'Mobile' PHP
315002 by: Lester Caine
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On Thu 22 Sep 2011 08:25:29 PM IST, Eric wrote:
> I have this problem when using php because my computer recognizes
> the characters "." and ".." as an existing file when I use file_exists. Also
> I want to check $_POST["username"] for characters other then A-Z a-z and 0-9.
> If it contains anything other then, I would like to prompt the user but
> I can't seam to use foreach properly and I don't know how to itterate
> through the post variable with a for loop while loop or do while loop.
file_exists() for . and .. would always return true, because they
really exist! . is an alias for the current directory and .. for the
parent directory. This is irrespective of OS.
To search $_POST["username"] for characters other than A-Z, a-z, 0-9,
you can use preg_match something like this (there's an alpha class as
well, but I'm not sure about it):
if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
// string contains other characters, write the code
}
--
Nilesh Govindarajan
http://nileshgr.com
--- End Message ---
--- Begin Message ---
On Thu, Sep 22, 2011 at 7:55 AM, Eric <[email protected]> wrote:
> I have this problem when using php because my computer recognizes
> the characters "." and ".." as an existing file when I use file_exists.
> Also
> I want to check $_POST["username"] for characters other then A-Z a-z and
> 0-9.
> If it contains anything other then, I would like to prompt the user but
> I can't seam to use foreach properly and I don't know how to itterate
> through the post variable with a for loop while loop or do while loop.
$pattern = '/^[A-Za-z0-9]/';
/* http://php.net/control-structures.foreach */
foreach ($_POST as $key => $value)
{
/* http://php.net/function.preg-match */
if (preg_match($pattern, $value) > 0)
{
/* prompt user */
}
}
--- End Message ---
--- Begin Message ---
if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
echo "<p style=\"color:red;font-weight:bold;margin-left:95px\">";
echo "Username must only contain A-Z and 0-9</p>";
include("register.html");
exit;
}
I used the code above but I now get this error message
Warning: preg_match() [function.preg-match]: Unknown modifier '^' in
C:\Documents and
Settings\iceweasel\Desktop\XAMPP\relik.ath.cx\forum\register.php on line 2
I don't like to run php with errors off so I wanna ask how I can fix this.
--- End Message ---
--- Begin Message ---
Use this regex:
if(preg_match('/[[:punct:]]/', $_POST['username']) !== 0) {
// string contains other characters, write the code
}
The POSIX class [:punct:] means matches any punctuation and symbols in your
string and that includes [!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]
Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar <http://www.twitter.com/igorescobar>
On Thu, Sep 22, 2011 at 9:17 AM, Nilesh Govindarajan
<[email protected]>wrote:
> On Thu 22 Sep 2011 08:25:29 PM IST, Eric wrote:
> > I have this problem when using php because my computer recognizes
> > the characters "." and ".." as an existing file when I use file_exists.
> Also
> > I want to check $_POST["username"] for characters other then A-Z a-z and
> 0-9.
> > If it contains anything other then, I would like to prompt the user but
> > I can't seam to use foreach properly and I don't know how to itterate
> > through the post variable with a for loop while loop or do while loop.
>
> file_exists() for . and .. would always return true, because they
> really exist! . is an alias for the current directory and .. for the
> parent directory. This is irrespective of OS.
>
> To search $_POST["username"] for characters other than A-Z, a-z, 0-9,
> you can use preg_match something like this (there's an alpha class as
> well, but I'm not sure about it):
>
> if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
> // string contains other characters, write the code
> }
>
> --
> Nilesh Govindarajan
> http://nileshgr.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Or... just use:
if(preg_match('/^[A-Za-z0-9]+$/', $_POST['username']) !== 0) {
// string contains other characters, write the code
}
You can see this regex in action here: http://regexpal.com/?flags=®ex=
^%5BA-Za-z0-9%5D%2B%24&input=myusername01
If you put anything different of A-Za-z0-9 the regex will not match.
Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar <http://www.twitter.com/igorescobar>
On Thu, Sep 22, 2011 at 10:03 AM, Igor Escobar <[email protected]>wrote:
> Use this regex:
> if(preg_match('/[[:punct:]]/', $_POST['username']) !== 0) {
>
> // string contains other characters, write the code
> }
>
> The POSIX class [:punct:] means matches any punctuation and symbols in
> your string and that includes [!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]
>
>
> Regards,
> Igor Escobar
> *Software Engineer
> *
> + http://blog.igorescobar.com
> + http://www.igorescobar.com
> + @igorescobar <http://www.twitter.com/igorescobar>
>
>
>
>
>
>
> On Thu, Sep 22, 2011 at 9:17 AM, Nilesh Govindarajan <[email protected]
> > wrote:
>
>> On Thu 22 Sep 2011 08:25:29 PM IST, Eric wrote:
>> > I have this problem when using php because my computer recognizes
>> > the characters "." and ".." as an existing file when I use file_exists.
>> Also
>> > I want to check $_POST["username"] for characters other then A-Z a-z and
>> 0-9.
>> > If it contains anything other then, I would like to prompt the user but
>> > I can't seam to use foreach properly and I don't know how to itterate
>> > through the post variable with a for loop while loop or do while loop.
>>
>> file_exists() for . and .. would always return true, because they
>> really exist! . is an alias for the current directory and .. for the
>> parent directory. This is irrespective of OS.
>>
>> To search $_POST["username"] for characters other than A-Z, a-z, 0-9,
>> you can use preg_match something like this (there's an alpha class as
>> well, but I'm not sure about it):
>>
>> if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
>> // string contains other characters, write the code
>> }
>>
>> --
>> Nilesh Govindarajan
>> http://nileshgr.com
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
--- End Message ---
--- Begin Message ---
Il 22/09/2011 17:54, Eric ha scritto:
> if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
Whi this '(.*)'?
For '.' and '..' problem use is_file().
Bye,
Marco
--- End Message ---
--- Begin Message ---
On 09/22/2011 10:54 AM, Eric wrote:
> if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
> echo "<p style=\"color:red;font-weight:bold;margin-left:95px\">";
> echo "Username must only contain A-Z and 0-9</p>";
> include("register.html");
> exit;
> }
>
> I used the code above but I now get this error message
>
> Warning: preg_match() [function.preg-match]: Unknown modifier '^' in
> C:\Documents and
> Settings\iceweasel\Desktop\XAMPP\relik.ath.cx\forum\register.php on line 2
>
> I don't like to run php with errors off so I wanna ask how I can fix this.
if(!ctype_alnum($_POST['username'])) {
// is not alpha numeric
}
--
Thanks!
-Shawn
http://www.spidean.com
--- End Message ---
--- Begin Message ---
On 09/22/2011 09:24 PM, Eric wrote:
> if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) {
> echo "<p style=\"color:red;font-weight:bold;margin-left:95px\">";
> echo "Username must only contain A-Z and 0-9</p>";
> include("register.html");
> exit;
> }
>
> I used the code above but I now get this error message
>
> Warning: preg_match() [function.preg-match]: Unknown modifier '^' in
> C:\Documents and
> Settings\iceweasel\Desktop\XAMPP\relik.ath.cx\forum\register.php on line 2
>
> I don't like to run php with errors off so I wanna ask how I can fix this.
Oh damn, I just forgot that the pattern is to be enclosed between
delimiters. Glad that you found the fix using ctype_alnum though. A new
learning for me.
--
Nilesh Govindarajan
http://nileshgr.com
--- End Message ---
--- Begin Message ---
As an alternative to the regular expression approaches already provided by
others, you could also use ctype_alnum():
if (ctyp_alnum($_POST['username'])) {
//username contains only letters and numbers
} else {
//username contains characters other than letters and numbers
} //if-else
Docs: <http://us3.php.net/manual/en/function.ctype-alnum.php>
As a bonus, this will likely be quite a bit quicker than the regex-based
approaches. That said, you'd have to be making many calls (e.g., inside a
loop) for the difference to reach the point of being noticeable. For
something like a one-time validation on page-load, use whichever you find
most comfortable.
In your original question, you also mentioned looping through a variable
to check for non-alphanumeric characters. The regex approach or the
approach I outlined above is much better in this case, but as a learning
exercise, you could do the looping like this:
$validCharacters = array('a', 'e', 'i', 'o', 'u');
for ($i = 0; $i < count($_POST['username']); $i++) {
if (in_array($_POST['username'][$i], $validCharacters)) {
echo 'Pass!';
} else {
echo 'Fail!';
} //if-else
} //for i
The key thing to note there is that you can treat the string like it's an
array to loop through it. For more information about this, go here:
<http://us2.php.net/manual/en/language.types.string.php>
and search the page for the phrase "String access and modification by
character".
Regards,
--
Robert E. Williams, Jr.
Associate Vice President of Software Development
Newtek Businesss Services, Inc. -- The Small Business Authority
https://www.newtekreferrals.com/rewjr
http://www.thesba.com/
Notice: This communication, including attachments, may contain information that
is confidential. It constitutes non-public information intended to be conveyed
only to the designated recipient(s). If the reader or recipient of this
communication is not the intended recipient, an employee or agent of the
intended recipient who is responsible for delivering it to the intended
recipient, or if you believe that you have received this communication in
error, please notify the sender immediately by return e-mail and promptly
delete this e-mail, including attachments without reading or saving them in any
manner. The unauthorized use, dissemination, distribution, or reproduction of
this e-mail, including attachments, is prohibited and may be unlawful. If you
have received this email in error, please notify us immediately by e-mail or
telephone and delete the e-mail and the attachments (if any).
--- End Message ---
--- Begin Message ---
On 09/22/2011 10:36 PM, Robert Williams wrote:
> As an alternative to the regular expression approaches already provided by
> others, you could also use ctype_alnum():
>
> if (ctyp_alnum($_POST['username'])) {
> //username contains only letters and numbers
> } else {
> //username contains characters other than letters and numbers
> } //if-else
>
> Docs: <http://us3.php.net/manual/en/function.ctype-alnum.php>
>
>
> As a bonus, this will likely be quite a bit quicker than the regex-based
> approaches. That said, you'd have to be making many calls (e.g., inside a
> loop) for the difference to reach the point of being noticeable. For
> something like a one-time validation on page-load, use whichever you find
> most comfortable.
>
> In your original question, you also mentioned looping through a variable
> to check for non-alphanumeric characters. The regex approach or the
> approach I outlined above is much better in this case, but as a learning
> exercise, you could do the looping like this:
>
> $validCharacters = array('a', 'e', 'i', 'o', 'u');
> for ($i = 0; $i < count($_POST['username']); $i++) {
> if (in_array($_POST['username'][$i], $validCharacters)) {
> echo 'Pass!';
> } else {
> echo 'Fail!';
> } //if-else
> } //for i
>
> The key thing to note there is that you can treat the string like it's an
> array to loop through it. For more information about this, go here:
>
> <http://us2.php.net/manual/en/language.types.string.php>
>
> and search the page for the phrase "String access and modification by
> character".
>
>
And if you want to go the loop way, you could use range() to fill values
in $validCharacters.
$validCharacters = array_merge(range('A', 'Z'), range('a', 'z'));
--
Nilesh Govindarajan
http://nileshgr.com
--- End Message ---
--- Begin Message ---
[Redirecting thread back to the list for the benefit of others.]
On 9/22/11 13:38, "Eric" <[email protected]> wrote:
>So is $_POST["username"][0] appropriate or does that only work
>with normal variables?
As far as this sort of manipulation goes, $_POST is just like any other
variable. Referencing the 0th element of any string will give you the
first character, if there is one. (If there isn't one, you'll generate a
PHP warning or notice for trying to read out-of-bounds.)
>and would this be valid,
>$i = 0;
>while($_POST["username"][$i] != "\0")
It looks like you're trying to treat the string as a C-style string. That
won't work in PHP because PHP's strings are not null-terminated. Thus,
this will lead to an infinite loop with any strings that don't happen to
have the null character somewhere within (and most strings won't).
>{
> if($_POST["username"][$i] == "." || $_POST["username"][$i] == "..")
This line is not wrong per-se, but nor does it entirely make sense. When
you access a string as an array, each element contains one character.
Here, you're checking whether each character in turn is a period (fine) or
two periods (makes no sense, since one character cannot represent two
period characters). What you'd probably want to do is simply remove the
second condition, since a check for one period will work just as well if
the name contains two periods. That is:
if($_POST["username"][$i] == ".")
Incidentally, another tip: when comparing against a constant, as you are
in both your while() and your if(), place the constant on the left side if
the expression rather than the right. That is, write the previous if()
like this:
if ('.' == $_POST['username'])
It might look a little funny, but I assure you, someday, it'll save you a
bunch of frustrating debugging time. The reason is that if you mistype the
'==' as '=', you'll do an assignment, the value of which is then returned.
This has the net effect of 1) quietly changing your variable's value, and
2) making the overall expression always evaluate to true, sending you into
the the true part of the conditional branch, well, unconditionally.
--
Robert E. Williams, Jr.
Associate Vice President of Software Development
Newtek Businesss Services, Inc. -- The Small Business Authority
https://www.newtekreferrals.com/rewjr
http://www.thesba.com/
Notice: This communication, including attachments, may contain information that
is confidential. It constitutes non-public information intended to be conveyed
only to the designated recipient(s). If the reader or recipient of this
communication is not the intended recipient, an employee or agent of the
intended recipient who is responsible for delivering it to the intended
recipient, or if you believe that you have received this communication in
error, please notify the sender immediately by return e-mail and promptly
delete this e-mail, including attachments without reading or saving them in any
manner. The unauthorized use, dissemination, distribution, or reproduction of
this e-mail, including attachments, is prohibited and may be unlawful. If you
have received this email in error, please notify us immediately by e-mail or
telephone and delete the e-mail and the attachments (if any).
--- End Message ---
--- Begin Message ---
Thanks Very much I used,
preg_match('/[[:punct:]]/', $_POST['username']) !== 0
and it works without errors. The reason I can't just use
is_file which I wish I could is because windows doesn't allow question marks
or some wierd character. It decides to not allow php to make the file if there
are odd ball characters. It is a very unfortunate mistake in my code that I
wish php would ignore and just make the file "?".
--- End Message ---
--- Begin Message ---
No problem ;)
Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar <http://www.twitter.com/igorescobar>
On Thu, Sep 22, 2011 at 1:25 PM, Eric <[email protected]> wrote:
> Thanks Very much I used,
> preg_match('/[[:punct:]]/', $_POST['username']) !== 0
> and it works without errors. The reason I can't just use
> is_file which I wish I could is because windows doesn't allow question
> marks
> or some wierd character. It decides to not allow php to make the file if
> there
> are odd ball characters. It is a very unfortunate mistake in my code that
> I
> wish php would ignore and just make the file "?".
--- End Message ---
--- Begin Message ---
On Thu, Sep 22, 2011 at 9:25 AM, Eric <[email protected]> wrote:
> Thanks Very much I used,
> preg_match('/[[:punct:]]/', $_POST['username']) !== 0
> and it works without errors. The reason I can't just use
> is_file which I wish I could is because windows doesn't allow question
> marks
> or some wierd character. It decides to not allow php to make the file if
> there
> are odd ball characters. It is a very unfortunate mistake in my code that
> I
> wish php would ignore and just make the file "?".
To prevent possible future warnings and errors use:
if (isset($_POST['username']) && preg_match('/[[:punct:]]/',
$_POST['username']) !== 0)
--- End Message ---
--- Begin Message ---
Looking for some explanation (and verification) as to why the virtual memory
increases by 5 fold (at the minimum) from 32 bit to 64 systems. I'm aware (for
the most part) of the int, struct, etc changes from 32 to 64 bit. Results from
running `php -r 'sleep(1000);' &` on 32 and 64 bit systems are below. PHP was
built by hand.
32 bit
System => Linux kronos 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT
2010 i686
Build Date => Sep 22 2011 08:50:40
Configure Command => './configure' '--prefix=/opt/php'
Test: php -r 'sleep(1000);' &
root 4863 0.0 0.1 7064 1064 ? Ss 08:21 0:00
/usr/sbin/sshd
root 5403 0.0 1.0 17736 11048 ? Ss 08:28 0:00
\_ sshd: root@pts/1
root 5418 0.0 0.1 4540 1488 pts/1 Ss 08:28 0:00
\_ -bash
root 2340 0.0 0.3 13240 3288 pts/1 S 08:53 0:00
\_ /opt/php/bin/php -r sleep(1000);
root 2341 0.0 0.0 4224 872 pts/1 R+ 08:53 0:00
\_ ps axuf
64 bit
System => Linux ceous 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT
2010 x86_64
Build Date => Sep 22 2011 08:51:02
Configure Command => './configure' '--prefix=/opt/php'
Test: php -r 'sleep(1000);' &
root 5181 0.0 0.1 62608 1220 ? Ss 08:22 0:00
/usr/sbin/sshd
root 5724 0.0 1.5 102020 15620 ? Ss 08:27 0:00
\_ sshd: root@pts/1
root 5726 0.0 0.1 66064 1608 pts/1 Ss 08:28 0:00
\_ -bash
root 2019 0.0 0.4 88864 4200 pts/1 S 08:54 0:00
\_ /opt/php/bin/php -r sleep(1000);
root 2021 0.0 0.0 65592 924 pts/1 R+ 08:54 0:00
\_ ps axuf
32 v. 64 virtual memory difference: 75624
Thanks!
--- End Message ---
--- Begin Message ---
Hey All,
I'm guessing that the subject probably doesn't fit the question I'm
asking here so I'll apologize in advance.
Lately I've been getting in to how I can streamline my development
after a bad experience with a contract. One of the areas I was looking
at is when it would be appropriate to use certain DB frameworks? What
I mean by frameworks is probably more like DB abstract, like Doctrine
or ZF's native Zend_Db. I know this isn't a black and white
explanation so I would like to know what influences your decision on
using a DB abstract framework. Whether to use one or not and if so
which one?
Jamie
--- End Message ---
--- Begin Message ---
Sorry, not sure if the first part of the conversation made it to the list.
I will be looking in to Symfony. I'm well versed with ZF and Zend_Db.
I'm also somewhat versed with Doctrine and integrating it with ZF. My
question isn't whether Doctrine is a part *of* that framework but
rather on *what* and *when* it is appropriate to *use* or *substitute*
something like Doctrine instead of using straight pdo or mysqli or the
abstract that came with that particular framework. Substituting
Doctrine or some other abstract could complicate a project rather than
help.
Jamie
On Thu, Sep 22, 2011 at 10:52 AM, Slith <[email protected]> wrote:
> Have you looked into other PHP Frameworks like Symfony that includes
> Doctrine support?
>
> Not sure exactly what your requirements are but most PHP frameworks include
> some sort of DB abstraction based on Active Record/ORM.
>
> See also CodeIgniter, Zend Framework
>
> On 9/22/2011 10:46 AM, Jamie Krasnoo wrote:
>>
>> Hey All,
>>
>> I'm guessing that the subject probably doesn't fit the question I'm
>> asking here so I'll apologize in advance.
>>
>> Lately I've been getting in to how I can streamline my development
>> after a bad experience with a contract. One of the areas I was looking
>> at is when it would be appropriate to use certain DB frameworks? What
>> I mean by frameworks is probably more like DB abstract, like Doctrine
>> or ZF's native Zend_Db. I know this isn't a black and white
>> explanation so I would like to know what influences your decision on
>> using a DB abstract framework. Whether to use one or not and if so
>> which one?
>>
>> Jamie
>>
>
>
--- End Message ---
--- Begin Message ---
Jamie Krasnoo wrote:
My question isn't whether Doctrine is a part*of* that framework but
rather on*what* and*when* it is appropriate to*use* or*substitute*
something like Doctrine instead of using straight pdo or mysqli or the
abstract that came with that particular framework. Substituting
Doctrine or some other abstract could complicate a project rather than
help.
Jamie
The first question is probably "do you need cross database operation?" If the
answer is no, then there is little point moving to an abstraction layer, you are
better sticking with your database of choice ...
If the requirement is to allow cross database working, then one needs to address
the SQL as well as the simple data stuff which PDO attempt. I've been using
ADOdb for a long time now and have also successfully moved projects TO that when
wanting to allow them to work with my own preferred database. It successfully
maps many SQL differences and tidies up those problems.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--- End Message ---
--- Begin Message ---
On Thu, Sep 22, 2011 at 11:31:54AM -0700, Jamie Krasnoo wrote:
> Sorry, not sure if the first part of the conversation made it to the list.
>
> I will be looking in to Symfony. I'm well versed with ZF and Zend_Db.
> I'm also somewhat versed with Doctrine and integrating it with ZF. My
> question isn't whether Doctrine is a part *of* that framework but
> rather on *what* and *when* it is appropriate to *use* or *substitute*
> something like Doctrine instead of using straight pdo or mysqli or the
> abstract that came with that particular framework. Substituting
> Doctrine or some other abstract could complicate a project rather than
> help.
Doctrine is more than just an abstraction layer. Well, no, but it's also
an ORM framework. That alone would kill it for me.
I built my own wrapper around PDO, that I use whenever possible. Main
reason: it makes my interface the same, whether I'm using MySQL or
PostgreSQL. That simplifies things for me. Why not just use PDO? I think
PDO, for all its assets, has kind of a clunky interface. When I'm doing
work internally, I use PostgreSQL. But for customers, I'm generally
forced to use MySQL. So having the same interface for both (for the most
part) eases the work. As for ORMs, I'm old skool; my preference is to
use straight SQL where possible. I think it makes you think more
carefully about your database structure and the type of queries you do.
And sooner or later, ORM gets in the way of multi-table foreign-key
reliant queries.
Paul
--
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com
--- End Message ---
--- Begin Message ---
Does anyone know of a site that has an online test of PHP skills? I'd
like to review my PHP knowledge.
I've already run across this site:
http://vladalexa.com/scripts/php/test/test_php_skill.html
Thanks,
Mike
--- End Message ---
--- Begin Message ---
On 2011-09-22, at 11:53 AM, Mike Hansen wrote:
> Does anyone know of a site that has an online test of PHP skills? I'd like to
> review my PHP knowledge.
>
> I've already run across this site:
> http://vladalexa.com/scripts/php/test/test_php_skill.html
--------
Doesn't appear to be working. Just has a link to some blog and no
results.
George
--- End Message ---
--- Begin Message ---
On 9/22/2011 1:11 PM, George Langley wrote:
On 2011-09-22, at 11:53 AM, Mike Hansen wrote:
Does anyone know of a site that has an online test of PHP skills? I'd like to
review my PHP knowledge.
I've already run across this site:
http://vladalexa.com/scripts/php/test/test_php_skill.html
--------
Doesn't appear to be working. Just has a link to some blog and no
results.
George
Same here. I found that out after taking the test.
Mike
--- End Message ---
--- Begin Message ---
On Thu, Sep 22, 2011 at 11:53:54AM -0600, Mike Hansen wrote:
> Does anyone know of a site that has an online test of PHP skills?
> I'd like to review my PHP knowledge.
>
> I've already run across this site:
> http://vladalexa.com/scripts/php/test/test_php_skill.html
>
> Thanks,
>
> Mike
I've had to take online PHP tests twice for recruiters. My beefs are 1)
they're not "open book", and I code with a tab open to php.net all the
time. (Who remembers which parameter comes first on which function call:
needle or haystack?) 2) They never tell you *what* you got wrong. That's
not very helpful.
Mind you, these aren't "free" tests like you're probably talking about.
They are through a vendor whom the recruiter probably pays to administer
the test.
Incidentally, despite having written an awful lot of working PHP code, I
don't do well on those tests. Helps my confidence a lot, as you can
imagine.
Paul
--
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com
--- End Message ---
--- Begin Message ---
On Thu, Sep 22, 2011 at 6:44 PM, Paul M Foster <[email protected]> wrote:
> On Thu, Sep 22, 2011 at 11:53:54AM -0600, Mike Hansen wrote:
>
>> Does anyone know of a site that has an online test of PHP skills?
>> I'd like to review my PHP knowledge.
>>
>> I've already run across this site:
>> http://vladalexa.com/scripts/php/test/test_php_skill.html
>>
>> Thanks,
>>
>> Mike
>
> I've had to take online PHP tests twice for recruiters. My beefs are 1)
> they're not "open book", and I code with a tab open to php.net all the
> time. (Who remembers which parameter comes first on which function call:
> needle or haystack?) 2) They never tell you *what* you got wrong. That's
> not very helpful.
>
> Mind you, these aren't "free" tests like you're probably talking about.
> They are through a vendor whom the recruiter probably pays to administer
> the test.
>
> Incidentally, despite having written an awful lot of working PHP code, I
> don't do well on those tests. Helps my confidence a lot, as you can
> imagine.
>
> Paul
>
Geez, closed book? I would have a hard time throwing:
?>pph
together.
--
Paul Halliday
http://www.squertproject.org/
--- End Message ---
--- Begin Message ---
There is the w3sxools website that has a php quiz.
Http://www.w3schools.com/php/default.asp
This site has many other languages that offer quizes also
----- Reply message -----
From: "Mike Hansen" <[email protected]>
To: <[email protected]>
Subject: [PHP] Any free online tests to test my PHP knowledge?
Date: Fri, Sep 23, 2011 3:51 am
On 9/22/2011 1:11 PM, George Langley wrote:
> On 2011-09-22, at 11:53 AM, Mike Hansen wrote:
>
>> Does anyone know of a site that has an online test of PHP skills? I'd like
>> to review my PHP knowledge.
>>
>> I've already run across this site:
>> http://vladalexa.com/scripts/php/test/test_php_skill.html
> --------
> Doesn't appear to be working. Just has a link to some blog and no
> results.
>
> George
>
>
Same here. I found that out after taking the test.
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
OK, I can see 'PHP for Android' which seems to have stalled, and I've been
playing with other options, but I'm not currently happy with any of this
'mobile' stuff.
The 'problem' is quite simple ... While mobile broadband might work in some
quite limited areas of the UK - like in bigger towns - it's reliability even in
smaller towns is simply getting worse! So a number of my customers have been
asking me to provide a backup system which is working fine on laptops, but these
are a little cumbersome when the guys have to work away from the vehicles.
Tablets via broadband work ... while one can get a signal ... and in many areas
around here even getting a PHONE signal depends on where you stand ... so I need
a working local PHP setup which can take over and provided things like access
codes and the like while out of range, and update the main database when back in
range.
Android, mobile windows and the like currently seem very restrictive when it
comes to this type of development, so has anybody got any ideas on how to
proceed? I though that Android was essentially a strangled version of Linux, so
it should be able to run any Linux application?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--- End Message ---