3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Phrase { public function __construct ( private string $text, ) {} public function __toString(): string { return $this->text; } } $ex = new \InvalidArgumentException(new Phrase('test'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9kYE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'phrase'
   17     1        NEW                                              $1      'InvalidArgumentException'
          2        NEW                                              $2      'Phrase'
          3        SEND_VAL_EX                                              'test'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
          8      > RETURN                                                   1

Class Phrase:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9kYE
function name:  __construct
number of ops:  4
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'text'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9kYE
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'text'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   14     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class Phrase.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.84 ms | 995 KiB | 13 Q