3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = "something class ... "; echo chr(92); $namespaces = array(); preg_match_all('/(use\s+[a-z0-9_\\\]+;\n?)/mi', $body, $namespaces); //echo preg_replace('/(use\s+[a-z0-9_\\\]+;\n*)/mi', '', $body); print_r($namespaces);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ygmjs
function name:  (null)
number of ops:  12
compiled vars:  !0 = $body, !1 = $namespaces
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'something%0A%0Aclass+...%0A%0A'
   10     1        ECHO                                                     '%5C'
   12     2        ASSIGN                                                   !1, <array>
   13     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%2F%28use%5Cs%2B%5Ba-z0-9_%5C%5C%5D%2B%3B%5Cn%3F%29%2Fmi'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !1
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.1 ms | 1394 KiB | 17 Q