3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new class { public $a; public $b = null; public $c = ""; public function set($name) { $this->a[$name] = $name; $this->b[$name] = $name; $this->c[$name] = $name; } public function exec() { var_dump($this->a); var_dump($this->b); var_dump($this->c); } }; $test->write([1,2,3]); $test->exec(); $test->write("test"); $test->exec(); $test->write(123456); $test->exec();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iej6r
function name:  (null)
number of ops:  20
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   22     4        INIT_METHOD_CALL                                         !0, 'write'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0          
   23     7        INIT_METHOD_CALL                                         !0, 'exec'
          8        DO_FCALL                                      0          
   24     9        INIT_METHOD_CALL                                         !0, 'write'
         10        SEND_VAL_EX                                              'test'
         11        DO_FCALL                                      0          
   25    12        INIT_METHOD_CALL                                         !0, 'exec'
         13        DO_FCALL                                      0          
   26    14        INIT_METHOD_CALL                                         !0, 'write'
         15        SEND_VAL_EX                                              123456
         16        DO_FCALL                                      0          
   27    17        INIT_METHOD_CALL                                         !0, 'exec'
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class class@anonymous:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iej6r
function name:  set
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      'a'
          2        ASSIGN_DIM                                               $1, !0
          3        OP_DATA                                                  !0
   10     4        FETCH_OBJ_W                                      $3      'b'
          5        ASSIGN_DIM                                               $3, !0
          6        OP_DATA                                                  !0
   11     7        FETCH_OBJ_W                                      $5      'c'
          8        ASSIGN_DIM                                               $5, !0
          9        OP_DATA                                                  !0
   12    10      > RETURN                                                   null

End of function set

Function exec:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iej6r
function name:  exec
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'a'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   17     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~2      'b'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   18     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~4      'c'
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
   19    12      > RETURN                                                   null

End of function exec

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.28 ms | 1392 KiB | 15 Q