3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public function __get($k) { echo 'getting ' . $k . PHP_EOL; } public function __set($k, $v) { echo 'setting ' . $k . ' = ' . $v . PHP_EOL; } } $e = new Example(); $e->foo = 'bar';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p7n6d
function name:  (null)
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'bar'
          5      > RETURN                                                   1

Class Example:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p7n6d
function name:  __get
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        CONCAT                                           ~1      'getting+', !0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
    7     4      > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p7n6d
function name:  __set
number of ops:  8
compiled vars:  !0 = $k, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        CONCAT                                           ~2      'setting+', !0
          3        CONCAT                                           ~3      ~2, '+%3D+'
          4        CONCAT                                           ~4      ~3, !1
          5        CONCAT                                           ~5      ~4, '%0A'
          6        ECHO                                                     ~5
   12     7      > RETURN                                                   null

End of function __set

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.02 ms | 1394 KiB | 13 Q