3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class TestCommand { public function __construct( private string $name, public bool $isDeveloper, public int $age, public int $id, ) {} } /* $testCommand = new TestCommand('John', 25, true); var_dump($testCommand); echo serialize($testCommand); */ $serializedClass = 'O:11:"TestCommand":3:{s:4:"name";s:4:"John";s:3:"age";i:25;s:11:"isDeveloper";b:1;}'; $testCommand = unserialize($serializedClass); var_dump($testCommand);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/koY5C
function name:  (null)
number of ops:  9
compiled vars:  !0 = $serializedClass, !1 = $testCommand
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ASSIGN                                                   !0, 'O%3A11%3A%22TestCommand%22%3A3%3A%7Bs%3A4%3A%22name%22%3Bs%3A4%3A%22John%22%3Bs%3A3%3A%22age%22%3Bi%3A25%3Bs%3A11%3A%22isDeveloper%22%3Bb%3A1%3B%7D'
   24     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   26     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class TestCommand:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/koY5C
function name:  __construct
number of ops:  13
compiled vars:  !0 = $name, !1 = $isDeveloper, !2 = $age, !3 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        ASSIGN_OBJ                                               'name'
          5        OP_DATA                                                  !0
          6        ASSIGN_OBJ                                               'isDeveloper'
          7        OP_DATA                                                  !1
          8        ASSIGN_OBJ                                               'age'
          9        OP_DATA                                                  !2
         10        ASSIGN_OBJ                                               'id'
         11        OP_DATA                                                  !3
   12    12      > RETURN                                                   null

End of function __construct

End of class TestCommand.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.57 ms | 1014 KiB | 15 Q