3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $chciDoArray1 = '1'; public $chciDoArray2 = '2'; public $chciDoArray3 = '3'; public $neChciDoArray = 'oops'; public function ohMyHandsWillFallOff() { return [ $this->chciDoArray1, $this->chciDoArray2, $this->chciDoArray3, ]; } } $a = new test(); var_dump((array)$a, json_decode(json_encode($a), true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YK619
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_FCALL                                               'var_dump'
          4        CAST                                          7  ~4      !0
          5        SEND_VAL                                                 ~4
          6        INIT_FCALL                                               'json_decode'
          7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class test:
Function ohmyhandswillfalloff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YK619
function name:  ohMyHandsWillFallOff
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'chciDoArray1'
          1        INIT_ARRAY                                       ~1      ~0
   15     2        FETCH_OBJ_R                                      ~2      'chciDoArray2'
          3        ADD_ARRAY_ELEMENT                                ~1      ~2
   16     4        FETCH_OBJ_R                                      ~3      'chciDoArray3'
          5        ADD_ARRAY_ELEMENT                                ~1      ~3
          6      > RETURN                                                   ~1
   18     7*     > RETURN                                                   null

End of function ohmyhandswillfalloff

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.97 ms | 1395 KiB | 19 Q