3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert_digits_to_en($entry){ $fmt = numfmt_create('fa', NumberFormatter::DECIMAL); return numfmt_parse($fmt, $entry); } echo convert_digits_to_en("test۰۹۱۲");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5EMY
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'convert_digits_to_en'
          1        SEND_VAL                                                 'test%DB%B0%DB%B9%DB%B1%DB%B2'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function convert_digits_to_en:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5EMY
function name:  convert_digits_to_en
number of ops:  13
compiled vars:  !0 = $entry, !1 = $fmt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'numfmt_create'
          2        SEND_VAL_EX                                              'fa'
          3        FETCH_CLASS_CONSTANT                             ~2      'NumberFormatter', 'DECIMAL'
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0  $3      
          6        ASSIGN                                                   !1, $3
    5     7        INIT_FCALL_BY_NAME                                       'numfmt_parse'
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $5      
         11      > RETURN                                                   $5
    6    12*     > RETURN                                                   null

End of function convert_digits_to_en

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
309.47 ms | 1002 KiB | 14 Q