3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $a = [1, 2, 3, 4, 5]; public function getA() { return $this->a; } } //$a = [1, 2, 3, 4, 5]; $test = new Test; $_a = $test->getA(); //shuffle($a); shuffle($_a); var_dump([ 'original' => $test->getA(), 'result _a' => $_a, //'result a' => $a, ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTlOh
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $_a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        INIT_METHOD_CALL                                         !0, 'getA'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   18     6        INIT_FCALL                                               'shuffle'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                                 
   20     9        INIT_FCALL                                               'var_dump'
   21    10        INIT_METHOD_CALL                                         !0, 'getA'
         11        DO_FCALL                                      0  $8      
         12        INIT_ARRAY                                       ~9      $8, 'original'
   22    13        ADD_ARRAY_ELEMENT                                ~9      !1, 'result+_a'
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
   24    16      > RETURN                                                   1

Class Test:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTlOh
function name:  getA
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function geta

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.58 ms | 1395 KiB | 17 Q