3v4l.org

run code in 300+ PHP versions simultaneously
<?php function demo( MissingClass|string $e ) { echo $e; } function demo2(): MissingClass|string { return "Or here\n"; } class WithProp { public MissingClass|string $val; public function __construct() { $this->val = "Or here either\n"; } } demo( "No errors here\n" ); print( demo2() ); $d = new WithProp(); echo $d->val;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pdkbv
function name:  (null)
number of ops:  12
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'demo'
          1        SEND_VAL                                                 'No+errors+here%0A'
          2        DO_FCALL                                      0          
   19     3        INIT_FCALL                                               'demo2'
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
   21     6        NEW                                              $3      'WithProp'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $3
   22     9        FETCH_OBJ_R                                      ~6      !0, 'val'
         10        ECHO                                                     ~6
   23    11      > RETURN                                                   1

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

End of function demo

Function demo2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pdkbv
function name:  demo2
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   'Or+here%0A'
    9     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function demo2

Class WithProp:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pdkbv
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN_OBJ                                               'val'
          1        OP_DATA                                                  'Or+here+either%0A'
   15     2      > RETURN                                                   null

End of function __construct

End of class WithProp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.07 ms | 1004 KiB | 15 Q