3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $x; public function __construct($x) { $this->x = 2*$x; } private static function a($xs, $m) { array_map(function($x) use ($m) { return new self($x*$m); }, $xs); } public static function b($xs) { return self::a($xs, 10); } } var_dump(Foo::b(array(1,2,3)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rV0Sl
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Foo', 'b'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FrV0Sl%3A10%240

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

End of function __construct

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rV0Sl
function name:  a
number of ops:  9
compiled vars:  !0 = $xs, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrV0Sl%3A10%240'
          4        BIND_LEXICAL                                             ~2, !1
   12     5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   13     8      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rV0Sl
function name:  b
number of ops:  7
compiled vars:  !0 = $xs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        INIT_STATIC_METHOD_CALL                                  'a'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 10
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
   17     6*     > RETURN                                                   null

End of function b

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.38 ms | 1400 KiB | 17 Q