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        ASSIGN                                                   !0, $1
    3     5        TYPE_CHECK                                  1018          !0
          6      > JMPZ                                                     ~3, ->11
    4     7    >   ECHO                                                     'PHP+7%0A'
    5     8        GET_TYPE                                         ~4      !0
          9        ECHO                                                     ~4
    3    10      > JMP                                                      ->14
    8    11    >   ECHO                                                     'PHP+5%0A'
    9    12        GET_TYPE                                         ~5      !0
         13        ECHO                                                     ~5
   10    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.17 ms | 1444 KiB | 14 Q