3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA %user:100 [ type=admin, added=10/12/1997, last-login:10/20/1997, total-logins:45, status:1 ] %user:111 [ type=user, added=10/12/1997, last-login:10/27/1997, total-logins:145, status:1 ] %user:112 [ type=viewer, added=10/12/1997, last-login:10/23/1997, total-logins:6, status:1 ] %user:113 [ type=viewer, added=10/12/1997, last-login:10/14/1997, total-logins:2, status:1] %user:114 [ type=viewer, added=10/12/1997, last-login:10/14/1997, total-logins:1, status:1] %user:115 [ type=viewer, added=10/12/1997, last-login:10/12/1997, total-logins:1, status:1 ] DATA; $result = preg_replace_callback("/^%[^][]*\[[^][]*]$/m", function($m) { return str_replace(PHP_EOL, "", $m[0]); }, $data); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IpQ9c
function name:  (null)
number of ops:  10
compiled vars:  !0 = $data, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%25user%3A100+%5B%0A++++type%3Dadmin%2C%0A++++added%3D10%2F12%2F1997%2C%0A++++last-login%3A10%2F20%2F1997%2C%0A++++total-logins%3A45%2C%0A++++status%3A1%0A%5D%0A%0A%25user%3A111+%5B%0A++++type%3Duser%2C%0A++++added%3D10%2F12%2F1997%2C%0A++++last-login%3A10%2F27%2F1997%2C%0A++++total-logins%3A145%2C%0A++++status%3A1%0A%5D%0A%0A%25user%3A112+%5B+type%3Dviewer%2C+added%3D10%2F12%2F1997%2C%0A++++last-login%3A10%2F23%2F1997%2C%0A++++total-logins%3A6%2C%0A++++status%3A1%0A%5D%0A%0A%25user%3A113+%5B+type%3Dviewer%2C+added%3D10%2F12%2F1997%2C++last-login%3A10%2F14%2F1997%2C++total-logins%3A2%2C+status%3A1%5D%0A%0A%25user%3A114+%5B+type%3Dviewer%2C+added%3D10%2F12%2F1997%2C++last-login%3A10%2F14%2F1997%2C++total-logins%3A1%2C+%0Astatus%3A1%5D%0A%0A%25user%3A115+%5B+type%3Dviewer%2C+added%3D10%2F12%2F1997%2C++last-login%3A10%2F12%2F1997%2C++total-logins%3A1%2C+%0Astatus%3A1%0A%5D'
   37     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%5E%25%5B%5E%5D%5B%5D%2A%5C%5B%5B%5E%5D%5B%5D%2A%5D%24%2Fm'
          3        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   39     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
   37     6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   40     8        ECHO                                                     !1
   41     9      > 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/IpQ9c
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   RECV                                             !0      
   38     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAL                                                 ''
          4        FETCH_DIM_R                                      ~1      !0, 0
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   39     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.74 ms | 1007 KiB | 15 Q