3v4l.org

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

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

End of function __construct

Function multiplybyno:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0OKp5
function name:  multiplyByNo
number of ops:  5
compiled vars:  !0 = $multiplier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~1      'holder'
          2        MUL                                              ~2      !0, ~1
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

End of function multiplybyno

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.99 ms | 1395 KiB | 15 Q