3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=new GMP(0); $x=$x+1; var_dump($x); var_dump((int)$x); class a { public function __construct($a = null) { $this->a =& $a; } public function __destruct() { $this->a = null; } } $f= new SplFixedArray(5); $a=[$f]; $f[0]=new a($a); echo(serialize([$a])); //var_dump($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tALg
function name:  (null)
number of ops:  30
compiled vars:  !0 = $x, !1 = $f, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'GMP'
          1        SEND_VAL_EX                                              0
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        ADD                                              ~6      !0, 1
          5        ASSIGN                                                   !0, ~6
    4     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        CAST                                          4  ~9      !0
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
   15    13        NEW                                              $11     'SplFixedArray'
         14        SEND_VAL_EX                                              5
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !1, $11
   16    17        INIT_ARRAY                                       ~14     !1
         18        ASSIGN                                                   !2, ~14
   17    19        NEW                                              $17     'a'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        ASSIGN_DIM                                               !1, 0
         23        OP_DATA                                                  $17
   18    24        INIT_FCALL                                               'serialize'
         25        INIT_ARRAY                                       ~19     !2
         26        SEND_VAL                                                 ~19
         27        DO_ICALL                                         $20     
         28        ECHO                                                     $20
   19    29      > RETURN                                                   1

Class a:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tALg
function name:  __construct
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                        !0      null
    9     1        ASSIGN_OBJ_REF                                           'a'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tALg
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN_OBJ                                               'a'
          1        OP_DATA                                                  null
   13     2      > RETURN                                                   null

End of function __destruct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.58 ms | 1405 KiB | 17 Q