3v4l.org

run code in 300+ PHP versions simultaneously
<?php class milad{ public function test(){ $this->test=function(){ return time()/2==0; }; } } $milad=new milad; $milad->test(); var_dump($milad->test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5ut6
function name:  (null)
number of ops:  10
compiled vars:  !0 = $milad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'milad'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   12     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !0, 'test'
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FH5ut6%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5ut6
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $0      
          2        DIV                                              ~1      $0, 2
          3        IS_EQUAL                                         ~2      ~1, 0
          4      > RETURN                                                   ~2
    7     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FH5ut6%3A5%240

Class milad:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5ut6
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FH5ut6%3A5%240'
          1        ASSIGN_OBJ                                               'test'
    7     2        OP_DATA                                                  ~1
    8     3      > RETURN                                                   null

End of function test

End of class milad.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.79 ms | 1395 KiB | 17 Q