3v4l.org

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

Class php:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JBMV4
function name:  get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
    6     3*     > 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/JBMV4
function name:  set
number of ops:  5
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
    9     4      > RETURN                                                   null

End of function set

End of class php.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.79 ms | 1394 KiB | 13 Q