3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Value { protected $value; public function __construct($value) { $this->value = $value; } public function getValue() { return $this->value; } } $three = new Value(3); $four = new Value(4); $closure = function ($delta, $de) { var_dump($delta+$de); }; //$a = new closure(); $closure(4); $closure->call($three, 4, 3, 5); $closure->call($four, 4, 2 , 1); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A9T5M
function name:  (null)
number of ops:  26
compiled vars:  !0 = $three, !1 = $four, !2 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'Value'
          1        SEND_VAL_EX                                              3
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   15     4        NEW                                              $6      'Value'
          5        SEND_VAL_EX                                              4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   17     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FA9T5M%3A17%240'
          9        ASSIGN                                                   !2, ~9
   19    10        INIT_DYNAMIC_CALL                                        !2
         11        SEND_VAL_EX                                              4
         12        DO_FCALL                                      0          
   21    13        INIT_METHOD_CALL                                         !2, 'call'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAL_EX                                              4
         16        SEND_VAL_EX                                              3
         17        SEND_VAL_EX                                              5
         18        DO_FCALL                                      0          
   22    19        INIT_METHOD_CALL                                         !2, 'call'
         20        SEND_VAR_EX                                              !1
         21        SEND_VAL_EX                                              4
         22        SEND_VAL_EX                                              2
         23        SEND_VAL_EX                                              1
         24        DO_FCALL                                      0          
   23    25      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FA9T5M%3A17%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A9T5M
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $delta, !1 = $de
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'var_dump'
          3        ADD                                              ~2      !0, !1
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
          6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FA9T5M%3A17%240

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

End of function __construct

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A9T5M
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
   11     2*     > RETURN                                                   null

End of function getvalue

End of class Value.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.31 ms | 1400 KiB | 15 Q