3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '😍'; echo bin2hex($input) . PHP_EOL; echo json_encode($input) . PHP_EOL; echo json_encode($input[0]); echo json_encode($input[1]); echo json_encode($input[2]); echo json_encode($input[3]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HuKpg
function name:  (null)
number of ops:  32
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%F0%9F%98%8D'
    4     1        INIT_FCALL                                               'bin2hex'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      $2, '%0A'
          5        ECHO                                                     ~3
    6     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      $4, '%0A'
         10        ECHO                                                     ~5
    8    11        INIT_FCALL                                               'json_encode'
         12        FETCH_DIM_R                                      ~6      !0, 0
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                         $7      
         15        ECHO                                                     $7
    9    16        INIT_FCALL                                               'json_encode'
         17        FETCH_DIM_R                                      ~8      !0, 1
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                         $9      
         20        ECHO                                                     $9
   10    21        INIT_FCALL                                               'json_encode'
         22        FETCH_DIM_R                                      ~10     !0, 2
         23        SEND_VAL                                                 ~10
         24        DO_ICALL                                         $11     
         25        ECHO                                                     $11
   11    26        INIT_FCALL                                               'json_encode'
         27        FETCH_DIM_R                                      ~12     !0, 3
         28        SEND_VAL                                                 ~12
         29        DO_ICALL                                         $13     
         30        ECHO                                                     $13
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.39 ms | 1395 KiB | 17 Q