3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = "רחוב אלסלבדור 41 דירה 84 ירושלים"; $result = preg_replace_callback('/\w+/', function($found) { foreach ($found as $value) { return strrev($value); } }, $word); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0foYa
function name:  (null)
number of ops:  12
compiled vars:  !0 = $word, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%D7%A8%D7%97%D7%95%D7%91+%D7%90%D7%9C%D7%A1%D7%9C%D7%91%D7%93%D7%95%D7%A8+41+%D7%93%D7%99%D7%A8%D7%94+84+%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D'
    4     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%5Cw%2B%2F'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F0foYa%3A4%240'
    8     4        SEND_VAL                                                 ~3
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
    4     7        ASSIGN                                                   !1, $4
   10     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F0foYa%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/0foYa
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $found, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > FE_RESET_R                                       $2      !0, ->9
          2    > > FE_FETCH_R                                               $2, !1, ->9
    6     3    >   INIT_FCALL                                               'strrev'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        FE_FREE                                                  $2
          7      > RETURN                                                   $3
    5     8*       JMP                                                      ->2
          9    >   FE_FREE                                                  $2
    8    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0foYa%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.57 ms | 1396 KiB | 19 Q