3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "age<21,length>10,height<>10,width!=100,name='Emma Einarsson' or it can be words time>=10,clouds<=4", "age < 21, length > 10, height <> 10, width != 100, name = 'Emma Einarsson' or it can be words time >= 10, clouds <= 4", "My name is Emma and i have a dillemma, what's the distance between 'New York' and 'Athene' ?", "'New York' and London at the start and end with Paris and 'Los Angeles'" ]; foreach ($strings as $string) { var_export(preg_match_all("~\B'\K(?:[^']+)|\b[a-z']+\b|\d+|[<>!=?]+~i", $string, $out) ? $out[0] : 'fail'); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/ARQJm
function name:  (null)
number of ops:  20
compiled vars:  !0 = $strings, !1 = $string, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                               $4, !1, ->18
   10     3    >   INIT_FCALL                                               'var_export'
          4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAL                                                 '%7E%5CB%27%5CK%28%3F%3A%5B%5E%27%5D%2B%29%7C%5Cb%5Ba-z%27%5D%2B%5Cb%7C%5Cd%2B%7C%5B%3C%3E%21%3D%3F%5D%2B%7Ei'
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !2
          8        DO_ICALL                                         $5      
          9      > JMPZ                                                     $5, ->13
         10    >   FETCH_DIM_R                                      ~6      !2, 0
         11        QM_ASSIGN                                        ~7      ~6
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~7      'fail'
         14    >   SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
   11    16        ECHO                                                     '%0A'
    9    17      > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.33 ms | 1003 KiB | 15 Q