3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(int $n, ?bool $m = false): string { $m = $m ? 'true' : 'false'; return "The number {$n} is called {$m}"; } $a = [1, 2, 3, 4, 5]; $c = array_map('hello', $a, array_fill(0,2,true)); print_r($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rpY7u
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'hello'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'array_fill'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
   13    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function hello:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rpY7u
function name:  hello
number of ops:  15
compiled vars:  !0 = $n, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    5     2      > JMPZ                                                     !1, ->5
          3    >   QM_ASSIGN                                        ~2      'true'
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      'false'
          6    >   ASSIGN                                                   !1, ~2
    6     7        ROPE_INIT                                     4  ~5      'The+number+'
          8        ROPE_ADD                                      1  ~5      ~5, !0
          9        ROPE_ADD                                      2  ~5      ~5, '+is+called+'
         10        ROPE_END                                      3  ~4      ~5, !1
         11        VERIFY_RETURN_TYPE                                       ~4
         12      > RETURN                                                   ~4
    7    13*       VERIFY_RETURN_TYPE                                       
         14*     > RETURN                                                   null

End of function hello

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.03 ms | 1005 KiB | 16 Q