3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('text' => "<h1>Кириллический URL</h1>\n<p>This is Cyrillic URL example. Try <a class=js-as dir=rtl href=עברית>RTL עברית</a>.</p>\n"); if (version_compare(PHP_VERSION, '5.4', '>=')) { $data = json_encode($array, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); } else { $data = str_replace('\\/', '/', json_encode($array)); } echo $data;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YTMtO
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'version_compare'
          2        SEND_VAL                                                 '8.0.0'
          3        SEND_VAL                                                 '5.4'
          4        SEND_VAL                                                 '%3E%3D'
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->13
    6     7    >   INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 320
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
         12      > JMP                                                      ->22
    8    13    >   INIT_FCALL                                               'str_replace'
         14        SEND_VAL                                                 '%5C%2F'
         15        SEND_VAL                                                 '%2F'
         16        INIT_FCALL                                               'json_encode'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        DO_ICALL                                         $7      
         21        ASSIGN                                                   !1, $7
   11    22    >   ECHO                                                     !1
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.42 ms | 1387 KiB | 19 Q