3v4l.org

run code in 500+ PHP versions simultaneously
<?php function doPrint(string $value): void { echo $value . "\n"; } match (rand(0,2)) { 0 => doPrint('zero'), 1 => doPrint('one'), default => '', };
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 195) Position 1 = 5, Position 2 = 10, Position 3 = 15
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
filename:       /in/Jiv21
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'rand'
          1        SEND_VAL                                                     0
          2        SEND_VAL                                                     2
          3        DO_ICALL                                             $0      
          4      > MATCH                                                        $0, [ 0:->5, 1:->10, ], ->15
    9     5    >   INIT_FCALL                                                   'doprint'
          6        SEND_VAL                                                     'zero'
          7        DO_FCALL                                          0  $2      
          8        QM_ASSIGN                                            ~3      $2
          9      > JMP                                                          ->17
   10    10    >   INIT_FCALL                                                   'doprint'
         11        SEND_VAL                                                     'one'
         12        DO_FCALL                                          0  $4      
         13        QM_ASSIGN                                            ~3      $4
         14      > JMP                                                          ->17
   11    15    >   QM_ASSIGN                                            ~3      ''
         16      > JMP                                                          ->17
         17    >   FREE                                                         $0
         18        FREE                                                         ~3
   12    19      > RETURN                                                       1

Function doprint:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jiv21
function name:  doPrint
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    5     1        CONCAT                                               ~1      !0, '%0A'
          2        ECHO                                                         ~1
    6     3      > RETURN                                                       null

End of function doprint

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.16 ms | 1166 KiB | 16 Q