3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { public function __set(string $name, int $value): void { $this->{$name} = $value; } } try { $o = new Foo; $o->{'"foo&voilĂ "'} = '5'; echo implode(', ', array_keys(get_object_vars($o))); } catch (throwable $e) { echo get_class($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4gqbq
function name:  (null)
number of ops:  21
compiled vars:  !0 = $o, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        ASSIGN_OBJ                                               !0, '%22foo%26voil%C3%A0%22'
          4        OP_DATA                                                  '5'
   12     5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 '%2C+'
          7        INIT_FCALL                                               'array_keys'
          8        INIT_FCALL                                               'get_object_vars'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        ECHO                                                     $8
         16      > JMP                                                      ->20
   13    17  E > > CATCH                                       last         'throwable'
   14    18    >   GET_CLASS                                        ~9      !1
         19        ECHO                                                     ~9
   15    20    > > RETURN                                                   1

Class Foo:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4gqbq
function name:  __set
number of ops:  5
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
    6     4      > RETURN                                                   null

End of function __set

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.46 ms | 1396 KiB | 19 Q