Re: [php-139] Test

From: Bruce Razban
Sent on: Wednesday, September 16, 2009 11:28 AM
Thanks Jerry.
 
-Bruce


From: "[address removed]" <[address removed]>
To: [address removed]; [address removed]
Cc: bruce r <[address removed]>
Sent: Wednesday, September 16, 2009 9:53:54 AM
Subject: Re: [php-139] Test

bruce

these are bitwise operators

& and,  ! or, ~ not, ^ exclusive or...xor, << left shift, >> right shift.

ez



-----Original Message-----
From: Logan Bailey
Sent: Sep 16, 2009 9:53 AM
To: [address removed]
Subject: Re: [php-139] Test

1. 3 & 5 is 11 & 101 which is 1;
2. If either of the array is empty, $a & $b === false.
3. ^ = xor.  Lots of fun, 3 ^ 5= 11 ^ 101 === 110;  Meaning the two compared bits have to be oposites. so 11 ^ 101 is 011 ^ 101 Then you look for non matching bits and you get 110 or 6;
4./5. YOu can easily figure out for youself using php Though they are
1.2345E+14
0.12345
respectively.  E just signifies scientific notation N * 10 ^m

6.  I believe hte correct syntax is
<script type="php"
Obviously the first one is not the answer as it will throw an error.

8.  Push and POP always work off the end of a stack(array).  that is why there is array_shift to get the variable off the front of the array.
On Sep 15, 2009, at 10:11 PM, Bruce Razban wrote:

Dear php-139ers!
 
I am working on getting Php5 Certification.
 
When I took the test, I was somewhat surprised by the following questions. I know that these only show in test and not in actual coding in the real world. But, here we go with the test:
 
1. We have $A and $B and their values are:  A is 3 and B is 5. Then they ask what is $A & $B?   I thought that this is bit-wise "AND" function, but, the answer of 3 did not work. Is there a single & and is it the logical and?
2. On question 1 above, suppose A and B are arrays, then what will A & B be?  (I am relying on my memory for this)
 
3. What if the function of ^ operator?   For example A^B? A and B could be variables, of arrays (Ofcourse with the $ in front of them)?
4. What is the value in decimal of number 12345E10?
5. What is the value in decimal of number 12345E -5?
6. Which of the following statements will work on any installation of PHP?
        <?
        ?>       or,
 
        <? Language=PHP5.2 ....
 
        ?>         //Sorry I am not sure about the exact syntax here.
 
7.  For Array A that contains (2, 3, 4, 5, 6, 7)  what does shift 2 do? What does shift -3 do?
 
8. And a general question:  On the push and pop instruction for an array how do we know which end (left of right) is to be considered?
 
I appreciate it if anyone can answer these.
 
Thanks.
 
-Bruce
 





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Bruce Razban ([address removed]) from The San Francisco PHP Meetup Group.
To learn more about Bruce Razban, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Logan Bailey ([address removed]) from The San Francisco PHP Meetup Group.
To learn more about Logan Bailey, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA

Our Sponsors

GameSpot.com

GameSpot.com & CBSi provides the facilities our group uses every month.

O'Reilly User Group Program

The O'Reilly User Group Program provides the great books we get monthly.

Other nearby
Meetups
Why these groups?
x

The Meetup Groups shown here are topically similar to The San Francisco PHP Meetup Group.

Groups are more likely to be displayed here if they:

  • have a Meetup scheduled
  • have a high rating
  • have a group photo
  • are "public" and not "private"
  • have shown they are likely to stick around (older than 30 days)

Log in

  • Not registered with us yet?
or

Log in to Meetup with your Facebook account.

Sign up

or

Join this Meetup Group even quicker with your Facebook account.

By clicking the "Sign up using Facebook" or "Sign up" buttons above, you agree to Meetup's Terms of Service