3v4l.org

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

Class YO:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DGp1m
function name:  add
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   POST_INC_OBJ                                     ~0      'test'
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function add

End of class YO.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1393 KiB | 13 Q