3v4l.org

run code in 300+ PHP versions simultaneously
<?php //if (version_compare(PHP_VERSION, '5.2', '<')) { // exit 'no json_encode() support'; //} $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 = json_encode($array); $data = str_replace('\\/', '/', json_encode($array)); //$data = preg_replace('/\\\\u([a-f0-9]{4})/e', "iconv('UCS-4LE', 'UTF-8', pack('V', hexdec('U$1')))", 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 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/923Dt
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    9     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
   10     7    >   INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 320
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
         12      > JMP                                                      ->26
   12    13    >   INIT_FCALL                                               'json_encode'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $6      
         16        ASSIGN                                                   !1, $6
   13    17        INIT_FCALL                                               'str_replace'
         18        SEND_VAL                                                 '%5C%2F'
         19        SEND_VAL                                                 '%2F'
         20        INIT_FCALL                                               'json_encode'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $8      
         23        SEND_VAR                                                 $8
         24        DO_ICALL                                         $9      
         25        ASSIGN                                                   !1, $9
   17    26    >   ECHO                                                     !1
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.19 ms | 1395 KiB | 19 Q