3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($test) { $arr = array("-1"); if ($test) { $arr = array("1", "2", "1"); } return $arr; } print_r(test(true)); print_r(test(false)); $x = "bla - 0"; $x = str_replace("-", "-1", $x); $x = explode(" ", $x); print_r($x); $arr = array("-1"); if ($arr == array("-1")) { print("yes"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/d2ZOZ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $x, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 <true>
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
   12     6        INIT_FCALL                                               'print_r'
          7        INIT_FCALL                                               'test'
          8        SEND_VAL                                                 <false>
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   14    12        ASSIGN                                                   !0, 'bla+-+0'
   15    13        INIT_FCALL                                               'str_replace'
         14        SEND_VAL                                                 '-'
         15        SEND_VAL                                                 '-1'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        ASSIGN                                                   !0, $7
   16    19        INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 '+'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $9      
         23        ASSIGN                                                   !0, $9
   17    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   19    27        ASSIGN                                                   !1, <array>
   21    28        IS_EQUAL                                                 !1, <array>
         29      > JMPZ                                                     ~13, ->31
   22    30    >   ECHO                                                     'yes'
   23    31    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/d2ZOZ
function name:  test
number of ops:  6
compiled vars:  !0 = $test, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2      > JMPZ                                                     !0, ->4
    6     3    >   ASSIGN                                                   !1, <array>
    8     4    > > RETURN                                                   !1
    9     5*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.05 ms | 1394 KiB | 21 Q