3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = substr("foo",3); if($foo !== FALSE){ echo "PHP 7\n"; echo gettype($foo); //string } else{ echo "PHP 5\n"; echo gettype($foo); //boolean }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ol85Y
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'substr'
         1        SEND_VAL                                                 'foo'
         2        SEND_VAL                                                 3
         3        DO_ICALL                                         $1      
         4        QM_ASSIGN                                                !0
   3     5        IS_EQUAL                                         ~3      !0, <false>
         6      > JMPZ                                                     ~3, ->11
   4     7    >   ASSIGN_OBJ                                               'PHP+7%0A'
   5     8        GET_TYPE                                         ~4      !0
         9        ASSIGN_OBJ                                               ~4
        10      > JMP                                                      ->14
   8    11    >   ASSIGN_OBJ                                               'PHP+5%0A'
   9    12        GET_TYPE                                         ~5      !0
        13        ASSIGN_OBJ                                               ~5
  10    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
14.55 ms | 882 KiB | 8 Q