3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Nunber{ public $a; public $b; function Soma(){ return $this->a+$this->b; } } $n = new Nunber; $z = new Nunber; $n->a = 5; $n->b = 6; $z->a = 7; $z->b = 6; $arr[] = $n; $arr[] = $z; $s = serialize($arr); $y = unserialize($s); #echo "$n->Soma()<br>"; echo $y[0]->Soma().' '.$y[1]->Soma();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nUIHv
function name:  (null)
number of ops:  36
compiled vars:  !0 = $n, !1 = $z, !2 = $arr, !3 = $s, !4 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $5      'Nunber'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
   12     3        NEW                                              $8      'Nunber'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $8
   14     6        ASSIGN_OBJ                                               !0, 'a'
          7        OP_DATA                                                  5
   15     8        ASSIGN_OBJ                                               !0, 'b'
          9        OP_DATA                                                  6
   17    10        ASSIGN_OBJ                                               !1, 'a'
         11        OP_DATA                                                  7
   18    12        ASSIGN_OBJ                                               !1, 'b'
         13        OP_DATA                                                  6
   20    14        ASSIGN_DIM                                               !2
         15        OP_DATA                                                  !0
   21    16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  !1
   23    18        INIT_FCALL                                               'serialize'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !3, $17
   24    22        INIT_FCALL                                               'unserialize'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !4, $19
   27    26        FETCH_DIM_R                                      ~21     !4, 0
         27        INIT_METHOD_CALL                                         ~21, 'Soma'
         28        DO_FCALL                                      0  $22     
         29        CONCAT                                           ~23     $22, '+'
         30        FETCH_DIM_R                                      ~24     !4, 1
         31        INIT_METHOD_CALL                                         ~24, 'Soma'
         32        DO_FCALL                                      0  $25     
         33        CONCAT                                           ~26     ~23, $25
         34        ECHO                                                     ~26
         35      > RETURN                                                   1

Class Nunber:
Function soma:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nUIHv
function name:  Soma
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        FETCH_OBJ_R                                      ~1      'b'
          2        ADD                                              ~2      ~0, ~1
          3      > RETURN                                                   ~2
    8     4*     > RETURN                                                   null

End of function soma

End of class Nunber.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.03 ms | 1400 KiB | 17 Q