Poor arguments against
Poor arguments against
Posted Feb 17, 2015 18:58 UTC (Tue) by marcH (subscriber, #57642)In reply to: Poor arguments against by rgmoore
Parent article: Scalar typing in the PHP world
> say ($a ^^ $b) ^^ $c; #prints "unknown"
I would expect both to return nil/blank line. Did you run these?
      Posted Feb 18, 2015 0:01 UTC (Wed)
                               by rgmoore (✭ supporter ✭, #75)
                              [Link] (2 responses)
       I just tested, and the first does return Nil and the second "unknown".  This makes perfect sense to me, because "true" ^^ "false" returns Nil, and Nil ^^ "unknown" returns "unknown".
      
           
     
    
      Posted Feb 18, 2015 0:22 UTC (Wed)
                               by marcH (subscriber, #57642)
                              [Link] (1 responses)
       
 
     
    
      Posted Feb 18, 2015 8:30 UTC (Wed)
                               by mbunkus (subscriber, #87248)
                              [Link] 
       
Therefore in "true" ^^ "false" you have two trueish operands and therefore the result will be Nil. 
Those strings are probably not the best and most self-explanatory when explaining Boolean concepts, though. 
     
    Poor arguments against
      Poor arguments against
      
Poor arguments against
      
 
           