3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ const ERROR_CODE = '404'; public $public_ex = 'this is public'; private $private_ex = 'this is private!'; protected $protected_ex = 'this should be protected'; public function getErrorCode() { return self::ERROR_CODE; } } $foo = new Foo; $foo_json = json_encode($foo); echo $foo_json;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nbdaP
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo, !1 = $foo_json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   14     7        ECHO                                                     !1
          8      > RETURN                                                   1

Class Foo:
Function geterrorcode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nbdaP
function name:  getErrorCode
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   '404'
   10     1*     > RETURN                                                   null

End of function geterrorcode

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.53 ms | 1394 KiB | 15 Q