3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user = new stdClass(); $user->id = 1; $user->name = 'John Doe'; class Herman { private $milk; public function setMilk($flag) { $this->milk = $flag; } } $hermit = new Herman(); $hermit->setMilk(true); $user->hermit = $hermit; $foobar = array('foo' => 'bar', 'user' => $user); echo serialize($foobar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/afjQu
function name:  (null)
number of ops:  23
compiled vars:  !0 = $user, !1 = $hermit, !2 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN_OBJ                                               !0, 'id'
          4        OP_DATA                                                  1
    4     5        ASSIGN_OBJ                                               !0, 'name'
          6        OP_DATA                                                  'John+Doe'
   16     7        NEW                                              $8      'Herman'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $8
   17    10        INIT_METHOD_CALL                                         !1, 'setMilk'
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
   19    13        ASSIGN_OBJ                                               !0, 'hermit'
         14        OP_DATA                                                  !1
   21    15        INIT_ARRAY                                       ~13     'bar', 'foo'
         16        ADD_ARRAY_ELEMENT                                ~13     !0, 'user'
         17        ASSIGN                                                   !2, ~13
   22    18        INIT_FCALL                                               'serialize'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $15     
         21        ECHO                                                     $15
         22      > RETURN                                                   1

Class Herman:
Function setmilk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/afjQu
function name:  setMilk
number of ops:  4
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'milk'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function setmilk

End of class Herman.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.49 ms | 1396 KiB | 15 Q