3v4l.org

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

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

End of function some

Function calc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1ItNm
function name:  calc
number of ops:  8
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1        INIT_METHOD_CALL                                             'some'
          2        SEND_VAR                                                     !0
          3        DO_FCALL                                          0  $2      
          4        MUL                                                  ~3      $2, 2
          5        ASSIGN                                                       !1, ~3
    8     6      > RETURN                                                       !1
    9     7*     > RETURN                                                       null

End of function calc

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.24 ms | 2332 KiB | 13 Q