3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[locations][0][name]'; function angularModel ($formName, $inputName) { $retVal = "formData ['" . $formName . "']"; $retVal .= preg_replace_callback ('/\[(\w+\)]/', function ($matches) { print_r ($matches); }, $inputName); return $retVal; } angularModel ('relation', $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q67IF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5Blocations%5D%5B0%5D%5Bname%5D'
   15     1        INIT_FCALL                                               'angularmodel'
          2        SEND_VAL                                                 'relation'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function angularmodel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q67IF
function name:  angularModel
number of ops:  14
compiled vars:  !0 = $formName, !1 = $inputName, !2 = $retVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        CONCAT                                           ~3      'formData+%5B%27', !0
          3        CONCAT                                           ~4      ~3, '%27%5D'
          4        ASSIGN                                                   !2, ~4
    8     5        INIT_FCALL                                               'preg_replace_callback'
          6        SEND_VAL                                                 '%2F%5C%5B%28%5Cw%2B%5C%29%5D%2F'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQ67IF%3A8%240'
   10     8        SEND_VAL                                                 ~6
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN_OP                                     8          !2, $7
   12    12      > RETURN                                                   !2
   13    13*     > RETURN                                                   null

End of function angularmodel

Function %00%7Bclosure%7D%2Fin%2FQ67IF%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q67IF
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQ67IF%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.76 ms | 1399 KiB | 18 Q