3v4l.org

run code in 500+ PHP versions simultaneously
<?php $num = "-$251"; $fmt = numfmt_create( 'en_US', NumberFormatter::CURRENCY); $f = numfmt_parse_currency($fmt, $num, $curr); var_dump($f, $curr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QFNTl
function name:  (null)
number of ops:  18
compiled vars:  !0 = $num, !1 = $fmt, !2 = $f, !3 = $curr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '-%24251'
    5     1        INIT_FCALL_BY_NAME                                           'numfmt_create'
          2        SEND_VAL_EX                                                  'en_US'
          3        FETCH_CLASS_CONSTANT                                 ~5      'NumberFormatter', 'CURRENCY'
          4        SEND_VAL_EX                                                  ~5
          5        DO_FCALL                                          0  $6      
          6        ASSIGN                                                       !1, $6
    7     7        INIT_FCALL_BY_NAME                                           'numfmt_parse_currency'
          8        SEND_VAR_EX                                                  !1
          9        SEND_VAR_EX                                                  !0
         10        SEND_VAR_EX                                                  !3
         11        DO_FCALL                                          0  $8      
         12        ASSIGN                                                       !2, $8
    8    13        INIT_FCALL                                                   'var_dump'
         14        SEND_VAR                                                     !2
         15        SEND_VAR                                                     !3
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.42 ms | 1882 KiB | 14 Q