3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { var $boo; function Foo() { $this->boo = md5('foo'); } function go() { echo $this->boo . PHP_EOL; } } $a = new Foo(); $a->go(); var_dump(memory_get_peak_usage());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jsqk6
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'go'
          4        DO_FCALL                                      0          
   21     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'memory_get_peak_usage'
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jsqk6
function name:  Foo
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'md5'
          1        SEND_VAL                                                 'foo'
          2        DO_ICALL                                         $1      
          3        ASSIGN_OBJ                                               'boo'
          4        OP_DATA                                                  $1
   10     5      > RETURN                                                   null

End of function foo

Function go:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jsqk6
function name:  go
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'boo'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   15     3      > RETURN                                                   null

End of function go

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.01 ms | 1400 KiB | 19 Q