3v4l.org

run code in 500+ PHP versions simultaneously
<?php function hello(int $n, bool $m): 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,count($a),true)); print_r($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IevIi
function name:  (null)
number of ops:  17
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        COUNT                                                ~3      !0
          7        SEND_VAL                                                     ~3
          8        SEND_VAL                                                     <true>
          9        DO_ICALL                                             $4      
         10        SEND_VAR                                                     $4
         11        DO_ICALL                                             $5      
         12        ASSIGN                                                       !1, $5
   13    13        INIT_FCALL                                                   'print_r'
         14        SEND_VAR                                                     !1
         15        DO_ICALL                                                     
         16      > 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/IevIi
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                                                 !1      
    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.5.0


preferences:
158.76 ms | 1895 KiB | 16 Q