3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array ( array ("title" => "one", "color" => "blue" ), array ("title" => "two", "color" => "green" ) ); $merged = array(); $str = "000three000red0!000four000white0!000five000black0!"; $pat = "/\d+(\D+)\d+(\D+)\d!/um"; preg_match_all($pat, $str, $match); var_dump($match); $merged = $original; foreach($match as $result) { //$merged[] = array("title" => $result, "color" => $result); } //print_r($merged);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/5iu1i
function name:  (null)
number of ops:  18
compiled vars:  !0 = $original, !1 = $merged, !2 = $str, !3 = $pat, !4 = $match, !5 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   15     2        ASSIGN                                                   !2, '000three000red0%21000four000white0%21000five000black0%21'
   16     3        ASSIGN                                                   !3, '%2F%5Cd%2B%28%5CD%2B%29%5Cd%2B%28%5CD%2B%29%5Cd%21%2Fum'
   18     4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAR                                                 !3
          6        SEND_VAR                                                 !2
          7        SEND_REF                                                 !4
          8        DO_ICALL                                                 
   20     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !4
         11        DO_ICALL                                                 
   22    12        ASSIGN                                                   !1, !0
   24    13      > FE_RESET_R                                       $13     !4, ->16
         14    > > FE_FETCH_R                                               $13, !5, ->16
         15    > > JMP                                                      ->14
         16    >   FE_FREE                                                  $13
   29    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1395 KiB | 17 Q