3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($n) { return $n ** 3; } $y = foo(5); $z=NULL; // undefined variable w/o error message in PHP // assign absolute value of $y to $z if ($y > 0) $z = $y; else $z = -$y; echo $z;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5RsU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $y, !1 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    7     4        ASSIGN                                                   !1, null
    9     5        IS_SMALLER                                               0, !0
          6      > JMPZ                                                     ~5, ->9
          7    >   ASSIGN                                                   !1, !0
          8      > JMP                                                      ->11
   10     9    >   MUL                                              ~7      !0, -1
         10        ASSIGN                                                   !1, ~7
   12    11    >   ECHO                                                     !1
         12      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5RsU
function name:  foo
number of ops:  4
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        POW                                              ~1      !0, 3
          2      > RETURN                                                   ~1
    4     3*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.3 ms | 1397 KiB | 14 Q