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] . $input[1] . $input[2] . $input[3]) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cLiSf
function name:  (null)
number of ops:  24
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
    5     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      $4, '%0A'
         10        ECHO                                                     ~5
    6    11        INIT_FCALL                                               'json_encode'
         12        FETCH_DIM_R                                      ~6      !0, 0
         13        FETCH_DIM_R                                      ~7      !0, 1
         14        CONCAT                                           ~8      ~6, ~7
         15        FETCH_DIM_R                                      ~9      !0, 2
         16        CONCAT                                           ~10     ~8, ~9
         17        FETCH_DIM_R                                      ~11     !0, 3
         18        CONCAT                                           ~12     ~10, ~11
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                         $13     
         21        CONCAT                                           ~14     $13, '%0A'
         22        ECHO                                                     ~14
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.6 ms | 1395 KiB | 17 Q