3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('name' => 'albert', 'age' => 31); var_dump(json_encode($array)); class Person { public $name = "Albert"; protected $age = 31; public function getAge() { return $this->age; } } $object = new Person(); var_dump(json_encode($object));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SdBW0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'json_encode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                                 
   17     7        NEW                                              $5      'Person'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
   18    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class Person:
Function getage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SdBW0
function name:  getAge
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'age'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function getage

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.24 ms | 1395 KiB | 17 Q