3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str='TABLE cancer ATTRIBUTES 4 Attribute1.1 numeric O Attribute1.2 numeric O Attribute1.3 numeric 0 Attribute1.4 numeric 0 OBJECTS 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24'; $line = ' Attribute1.2 numeric O '; preg_match_all('/[\w\d\.]+/', $line); var_dump(implode(' ', $line[0])); exit; foreach (preg_split("/\\r\\n|\\r|\\n/", $str) as $line) { preg_match_all('/[\w\d\.]+/', $line, $result); var_dump(implode(' ', $result[0])); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/acDh6
function name:  (null)
number of ops:  37
compiled vars:  !0 = $str, !1 = $line, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'TABLE+cancer%0AATTRIBUTES+4%0AAttribute1.1++++numeric++++++++++O%0A++++Attribute1.2+numeric++++++++++++++++++++++++O%0A++++++++++++Attribute1.3+numeric+0%0A+++Attribute1.4+++++numeric+0%0AOBJECTS+6%0A1+2+3+4%0A5+6+7+8%0A9+10+11+12%0A13+++++++++++14+15+16%0A17+18+19+20%0A21+22+23+24'
   16     1        ASSIGN                                                   !1, '++++Attribute1.2+numeric++++++++++++++++++++++++O++'
   17     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%5B%5Cw%5Cd%5C.%5D%2B%2F'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
   18     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '+'
          9        FETCH_DIM_R                                      ~6      !1, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   20    14      > EXIT                                                     
   21    15*       INIT_FCALL                                               'preg_split'
         16*       SEND_VAL                                                 '%2F%5Cr%5Cn%7C%5Cr%7C%5Cn%2F'
         17*       SEND_VAR                                                 !0
         18*       DO_ICALL                                         $9      
         19*       FE_RESET_R                                       $10     $9, ->35
         20*       FE_FETCH_R                                               $10, !1, ->35
   22    21*       INIT_FCALL                                               'preg_match_all'
         22*       SEND_VAL                                                 '%2F%5B%5Cw%5Cd%5C.%5D%2B%2F'
         23*       SEND_VAR                                                 !1
         24*       SEND_REF                                                 !2
         25*       DO_ICALL                                                 
   23    26*       INIT_FCALL                                               'var_dump'
         27*       INIT_FCALL                                               'implode'
         28*       SEND_VAL                                                 '+'
         29*       FETCH_DIM_R                                      ~12     !2, 0
         30*       SEND_VAL                                                 ~12
         31*       DO_ICALL                                         $13     
         32*       SEND_VAR                                                 $13
         33*       DO_ICALL                                                 
   21    34*       JMP                                                      ->20
         35*       FE_FREE                                                  $10
   33    36*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.66 ms | 1396 KiB | 21 Q