3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = 'Hello %% World'; $searchArray = explode(' ', $search); var_dump($searchArray); echo rtrim(str_repeat('title LIKE ? OR ', count($searchArray)), ' OR '); $parameters = array_map(function($value) { return $value . '%'; }, $searchArray); var_dump($parameters);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1D1OI
function name:  (null)
number of ops:  29
compiled vars:  !0 = $search, !1 = $searchArray, !2 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello+%25%25+World'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'rtrim'
         10        INIT_FCALL                                               'str_repeat'
         11        SEND_VAL                                                 'title+LIKE+%3F+OR+'
         12        COUNT                                            ~7      !1
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        SEND_VAL                                                 '+OR+'
         17        DO_ICALL                                         $9      
         18        ECHO                                                     $9
    8    19        INIT_FCALL                                               'array_map'
         20        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1D1OI%3A8%240'
         21        SEND_VAL                                                 ~10
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $11     
         24        ASSIGN                                                   !2, $11
    9    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1D1OI%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1D1OI
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      !0, '%25'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1D1OI%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
197.96 ms | 1396 KiB | 23 Q