3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = [1,2,3]; $y1 = [1,2,3]; $y2 = [0,1,2,3]; $y3 = [0,1,2,3,4]; $y4 = [5,1,2,3,4]; $y5 = [2,1,2,3]; $n1 = [1,2]; $n2 = [1,3,2]; function test($test) { global $target; $t = implode($test, ''); $s = implode($target, ''); return strpos($t, $s) !== false; } var_dump(test($y1)); var_dump(test($y2)); var_dump(test($y3)); var_dump(test($y4)); var_dump(test($y5)); echo "\n"; var_dump(test($n1)); var_dump(test($n2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sNvsq
function name:  (null)
number of ops:  52
compiled vars:  !0 = $target, !1 = $y1, !2 = $y2, !3 = $y3, !4 = $y4, !5 = $y5, !6 = $n1, !7 = $n2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    7     3        ASSIGN                                                   !3, <array>
    8     4        ASSIGN                                                   !4, <array>
    9     5        ASSIGN                                                   !5, <array>
   11     6        ASSIGN                                                   !6, <array>
   12     7        ASSIGN                                                   !7, <array>
   22     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'test'
         10        SEND_VAR                                                 !1
         11        DO_FCALL                                      0  $16     
         12        SEND_VAR                                                 $16
         13        DO_ICALL                                                 
   23    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'test'
         16        SEND_VAR                                                 !2
         17        DO_FCALL                                      0  $18     
         18        SEND_VAR                                                 $18
         19        DO_ICALL                                                 
   24    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'test'
         22        SEND_VAR                                                 !3
         23        DO_FCALL                                      0  $20     
         24        SEND_VAR                                                 $20
         25        DO_ICALL                                                 
   25    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'test'
         28        SEND_VAR                                                 !4
         29        DO_FCALL                                      0  $22     
         30        SEND_VAR                                                 $22
         31        DO_ICALL                                                 
   26    32        INIT_FCALL                                               'var_dump'
         33        INIT_FCALL                                               'test'
         34        SEND_VAR                                                 !5
         35        DO_FCALL                                      0  $24     
         36        SEND_VAR                                                 $24
         37        DO_ICALL                                                 
   27    38        ECHO                                                     '%0A'
   28    39        INIT_FCALL                                               'var_dump'
         40        INIT_FCALL                                               'test'
         41        SEND_VAR                                                 !6
         42        DO_FCALL                                      0  $26     
         43        SEND_VAR                                                 $26
         44        DO_ICALL                                                 
   29    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'test'
         47        SEND_VAR                                                 !7
         48        DO_FCALL                                      0  $28     
         49        SEND_VAR                                                 $28
         50        DO_ICALL                                                 
         51      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sNvsq
function name:  test
number of ops:  19
compiled vars:  !0 = $test, !1 = $target, !2 = $t, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        BIND_GLOBAL                                              !1, 'target'
   17     2        INIT_FCALL                                               'implode'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 ''
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !2, $4
   18     7        INIT_FCALL                                               'implode'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 ''
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !3, $6
   19    12        INIT_FCALL                                               'strpos'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $8      
         16        TYPE_CHECK                                  1018  ~9      $8
         17      > RETURN                                                   ~9
   20    18*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.67 ms | 1394 KiB | 26 Q