3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* $a = '011'; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); echo PHP_EOL; $a = 011; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); echo PHP_EOL; $a = '11'; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); */ $b = 2; $a = $b ?: 1; echo $a;
based on sPACK
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/SBZAk
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b, !1 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  25     0  E >   ASSIGN                                                   !0, 2
  26     1        JMP_SET                                          ~3      !0, ->3
         2        QM_ASSIGN                                        ~3      1
         3        ASSIGN                                                   !1, ~3
  28     4        ECHO                                                     !1
         5      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0