3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo ' substr: ' . substr( "On the Rhône", 0, 12 ) . PHP_EOL; echo 'mb_substr: ' . mb_substr( "On the Rhône", 0, 12 ) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DeJdr
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_3                substr              ~0      'On+the+Rh%C3%B4ne', 0
          1        OP_DATA                                                      12
          2        CONCAT                                               ~1      '+++substr%3A+', ~0
          3        CONCAT                                               ~2      ~1, '%0A'
          4        ECHO                                                         ~2
    4     5        INIT_FCALL                                                   'mb_substr'
          6        SEND_VAL                                                     'On+the+Rh%C3%B4ne'
          7        SEND_VAL                                                     0
          8        SEND_VAL                                                     12
          9        DO_ICALL                                             $3      
         10        CONCAT                                               ~4      'mb_substr%3A+', $3
         11        CONCAT                                               ~5      ~4, '%0A'
         12        ECHO                                                         ~5
    5    13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
183.67 ms | 3355 KiB | 14 Q