3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data='intervals [1]: xmin = 0 xmax = 13.139997023062838 text = "" intervals [2]: xmin = 13.139997023062838 xmax = 14.763036269953904 text = "Cities are like siblings in a large polygamous family." intervals [3]: xmin = 14.763036269953904 xmax = 17.01 text = ""'; $pat='/xmin = (?P<xmin>\S+)\s+xmax = (?P<xmax>\S+)\s+text = "(?P<text>[^"]*)/'; if(preg_match_all($pat,$data,$m,PREG_SET_ORDER)){ $assoc_multidim=array_map(function($a){return array_intersect_key($a,['xmin'=>'','xmax'=>'','text'=>'']);},$m); var_export($assoc_multidim); }else{ echo "substring extraction failed"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tDT84
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data, !1 = $pat, !2 = $m, !3 = $assoc_multidim
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'intervals+%5B1%5D%3A%0A++++xmin+%3D+0+%0A++++xmax+%3D+13.139997023062838+%0A++++text+%3D+%22%22+%0Aintervals+%5B2%5D%3A%0A++++xmin+%3D+13.139997023062838+%0A++++xmax+%3D+14.763036269953904+%0A++++text+%3D+%22Cities+are+like+siblings+in+a+large+polygamous+family.%22+%0Aintervals+%5B3%5D%3A%0A++++xmin+%3D+14.763036269953904+%0A++++xmax+%3D+17.01+%0A++++text+%3D+%22%22'
   14     1        ASSIGN                                                   !1, '%2Fxmin+%3D+%28%3FP%3Cxmin%3E%5CS%2B%29%5Cs%2Bxmax+%3D+%28%3FP%3Cxmax%3E%5CS%2B%29%5Cs%2Btext+%3D+%22%28%3FP%3Ctext%3E%5B%5E%22%5D%2A%29%2F'
   15     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $6      
          8      > JMPZ                                                     $6, ->19
   16     9    >   INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
         11        SEND_VAL                                                 ~7
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !3, $8
   17    15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   15    18      > JMP                                                      ->20
   19    19    >   ECHO                                                     'substring+extraction+failed'
   20    20    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tDT84
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'array_intersect_key'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.49 ms | 1004 KiB | 17 Q