3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); $r = new class() { public int $int; public float $float; public bool $bool; public array $array; public string $string; public stdClass $std; public function __construct(){ var_dump($this->string); echo $this->string += 10; var_dump($this->string); } }; var_dump($r); $foo = null; $foo .= "baz"; var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFd1t
function name:  (null)
number of ops:  13
compiled vars:  !0 = $r, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   17     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   20     7        ASSIGN                                                   !1, null
   21     8        ASSIGN_OP                                     8          !1, 'baz'
   22     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFd1t
function name:  __construct
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'string'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   13     4        ASSIGN_OBJ_OP                                 1  ~2      'string'
          5        OP_DATA                                                  10
          6        ECHO                                                     ~2
   14     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~3      'string'
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
   15    11      > RETURN                                                   null

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.53 ms | 1002 KiB | 14 Q