3v4l.org

run code in 500+ PHP versions simultaneously
<?php $hex = "abba test baab"; $hex = array_map(function ($x) { return ($x === 'a') ? 'b' : (($x === 'b') ? 'a' : $x); }, str_split($hex)); echo implode('', $hex);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eCaFP
function name:  (null)
number of ops:  13
compiled vars:  !0 = $hex
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'abba+test+baab'
    4     1        INIT_FCALL                                                   'array_map'
          2        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
    6     3        SEND_VAL                                                     ~2
          4        INIT_FCALL                                                   'str_split'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $3      
          7        SEND_VAR                                                     $3
    4     8        DO_ICALL                                             $4      
          9        ASSIGN                                                       !0, $4
    8    10        FRAMELESS_ICALL_2                implode             ~6      '', !0
         11        ECHO                                                         ~6
         12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eCaFP
function name:  {closure:/in/eCaFP:4}
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        IS_IDENTICAL                                                 !0, 'a'
          2      > JMPZ                                                         ~1, ->5
          3    >   QM_ASSIGN                                            ~2      'b'
          4      > JMP                                                          ->11
          5    >   IS_IDENTICAL                                                 !0, 'b'
          6      > JMPZ                                                         ~3, ->9
          7    >   QM_ASSIGN                                            ~4      'a'
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~4      !0
         10    >   QM_ASSIGN                                            ~2      ~4
         11    > > RETURN                                                       ~2
    6    12*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.32 ms | 2415 KiB | 15 Q