3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x) { return $x*$x; } $foo = function($x) { return $x*$x; }; $bar = foo(2); $baz = $foo(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pOkFs
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpOkFs%3A8%240'
          1        ASSIGN                                                   !0, ~3
   13     2        INIT_FCALL                                               'foo'
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   14     6        INIT_DYNAMIC_CALL                                        !0
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !2, $7
         10      > RETURN                                                   1

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

End of function foo

Function %00%7Bclosure%7D%2Fin%2FpOkFs%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pOkFs
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        MUL                                              ~1      !0, !0
          2      > RETURN                                                   ~1
   11     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpOkFs%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.63 ms | 1398 KiB | 14 Q