3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("memory_limit", "5M"); class Foo { public function __set($prop, $value) { echo "__set($prop, $value)\n"; if ($value == "bar") { str_repeat("a", 1e7); } } } $foo = new Foo(); register_shutdown_function(function() use ($foo) { $foo->bar = 'baz'; }); $foo->bar = 'bar';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q7nSo
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'memory_limit'
          2        SEND_VAL                                                 '5M'
          3        DO_ICALL                                                 
   14     4        NEW                                              $2      'Foo'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   16     7        INIT_FCALL                                               'register_shutdown_function'
          8        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          9        BIND_LEXICAL                                             ~5, !0
   18    10        SEND_VAL                                                 ~5
   16    11        DO_ICALL                                                 
   20    12        ASSIGN_OBJ                                               !0, 'bar'
         13        OP_DATA                                                  'bar'
         14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q7nSo
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   BIND_STATIC                                              !0
   17     1        ASSIGN_OBJ                                               !0, 'bar'
          2        OP_DATA                                                  'baz'
   18     3      > RETURN                                                   null

End of Dynamic Function 0

Class Foo:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/Q7nSo
function name:  __set
number of ops:  15
compiled vars:  !0 = $prop, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ROPE_INIT                                     5  ~3      '__set%28'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_ADD                                      2  ~3      ~3, '%2C+'
          5        ROPE_ADD                                      3  ~3      ~3, !1
          6        ROPE_END                                      4  ~2      ~3, '%29%0A'
          7        ECHO                                                     ~2
    8     8        IS_EQUAL                                                 !1, 'bar'
          9      > JMPZ                                                     ~6, ->14
    9    10    >   INIT_FCALL                                               'str_repeat'
         11        SEND_VAL                                                 'a'
         12        SEND_VAL                                                 1.0e+7
         13        DO_ICALL                                                 
   11    14    > > RETURN                                                   null

End of function __set

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.12 ms | 1452 KiB | 16 Q