3v4l.org

run code in 500+ PHP versions simultaneously
<?php $haystack = ['one', 'two', 'three', 'four']; $test_needles = ['onE', 'tWo', 'THREE', 'four', 'five']; foreach ($test_needles as $needle) { printf( "%s : %s\n", $needle, array_all($haystack, fn($hay) => strcasecmp($hay, $needle)) ? 'missing' : 'found' ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/CG3VK
function name:  (null)
number of ops:  22
compiled vars:  !0 = $haystack, !1 = $test_needles, !2 = $needle
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2      > FE_RESET_R                                           $5      !1, ->20
          3    > > FE_FETCH_R                                                   $5, !2, ->20
    7     4    >   INIT_FCALL                                                   'printf'
    8     5        SEND_VAL                                                     '%25s+%3A+%25s%0A'
    9     6        SEND_VAR                                                     !2
   10     7        INIT_FCALL                                                   'array_all'
          8        SEND_VAR                                                     !0
          9        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
         10        BIND_LEXICAL                                                 ~6, !2
         11        SEND_VAL                                                     ~6
         12        DO_ICALL                                             $7      
         13      > JMPZ                                                         $7, ->16
         14    >   QM_ASSIGN                                            ~8      'missing'
         15      > JMP                                                          ->17
         16    >   QM_ASSIGN                                            ~8      'found'
         17    >   SEND_VAL                                                     ~8
    7    18        DO_ICALL                                                     
    6    19      > JMP                                                          ->3
         20    >   FE_FREE                                                      $5
   12    21      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CG3VK
function name:  {closure:/in/CG3VK:10}
number of ops:  8
compiled vars:  !0 = $hay, !1 = $needle
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        INIT_FCALL                                                   'strcasecmp'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                             $2      
          6      > RETURN                                                       $2
          7*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.18 ms | 1486 KiB | 16 Q