3v4l.org

run code in 300+ PHP versions simultaneously
<?php class caster{ function __set($name, $value){ return $value . "foo"; } function __get($aaa){ return "hey"; } } function c(){ return new caster; } $fac = c()->hey = 10 + 10; var_dump($fac);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Bl1D
function name:  (null)
number of ops:  10
compiled vars:  !0 = $fac
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'c'
          1        DO_FCALL                                      0  $1      
          2        SEPARATE                                         $1      $1
          3        ASSIGN_OBJ                                       ~2      $1, 'hey'
          4        OP_DATA                                                  20
          5        ASSIGN                                                   !0, ~2
   17     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Bl1D
function name:  c
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'caster'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function c

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

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Bl1D
function name:  __get
number of ops:  3
compiled vars:  !0 = $aaa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   'hey'
   10     2*     > RETURN                                                   null

End of function __get

End of class caster.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.36 ms | 1399 KiB | 16 Q