3v4l.org

run code in 300+ PHP versions simultaneously
<?php //I want the 'delimX' to be included as well: $str = "It seems entirely 1 (b natural b) to us that there are teams of scientists in universities and other institutions around the world, attempting to 2 (b discover b) the way the world works. However, it hasn't always been that 3 (b way b) . Although the scientific method is now four or five hundred years old, the ancient Greeks, for example, believed that they could work out the 4 (b causes b) of natural events just by the power of thought."; $result = preg_split ('~([0-9 ]\(b.*?b\))~',$str ,-1, PREG_SPLIT_DELIM_CAPTURE); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pr9Vh
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'It+seems+entirely+1+%28b+natural+b%29+to+us+that+there+are+teams+of+scientists+in+universities+and+other+institutions+around+the+world%2C+attempting+to+2+%28b+discover+b%29+the+way+the+world+works.+However%2C+it+hasn%27t+always+been+that+3+%28b+way+b%29+.+Although+the+scientific+method+is+now+four+or+five+hundred+years+old%2C+the+ancient+Greeks%2C+for+example%2C+believed+that+they+could+work+out+the+4+%28b+causes+b%29+of+natural+events+just+by+the+power+of+thought.'
    4     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%7E%28%5B0-9+%5D%5C%28b.%2A%3Fb%5C%29%29%7E'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 -1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
    5     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.42 ms | 1394 KiB | 17 Q