3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<TEXT ~THE BURGER ZERO~ No burger, no bun, just air. ~TRICKY TEST~ Meet me ~5pm. ~THE BURGER ITALIANO~ A soft mix of ground beef & mozzarella stuffed between two pillowy pieces of pasta.~NOTE~This is basically giant ravioli. ~THE BURGER MINI~A tiny little burger patty in a tiny little bun. TEXT; $pattern = '/ \s* ~ ( [\p{Lu} ]+ ) ~ \s* /ux'; $arr = preg_split($pattern, $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); print_r(array_chunk($arr, 2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5JtqS
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $pattern, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7ETHE+BURGER+ZERO%7E%0ANo+burger%2C+no+bun%2C+just+air.%0A%0A%7ETRICKY+TEST%7E%0AMeet+me+%7E5pm.%0A%0A%7ETHE+BURGER+ITALIANO%7E%0AA+soft+mix+of+ground+beef+%26+mozzarella+stuffed+between+two+pillowy+pieces+of+pasta.%7ENOTE%7EThis+is+basically+giant+ravioli.%0A%0A%7ETHE+BURGER+MINI%7EA+tiny+little+burger+patty+in+a+tiny+little+bun.'
   16     1        ASSIGN                                                   !1, '%2F+%5Cs%2A+%7E+%28+%5B%5Cp%7BLu%7D+%5D%2B+%29+%7E+%5Cs%2A+%2Fux'
   18     2        INIT_FCALL                                               'preg_split'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 -1
          6        SEND_VAL                                                 3
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
   20     9        INIT_FCALL                                               'print_r'
         10        INIT_FCALL                                               'array_chunk'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.74 ms | 1001 KiB | 16 Q