3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nf = new \NumberFormatter('en', \NumberFormatter::CURRENCY); $nf->setAttribute(\NumberFormatter::FRACTION_DIGITS, 0); try { return $nf->formatCurrency(1234, 'GBP'); } catch (\Exception $e) { return '-'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f0JY0
function name:  (null)
number of ops:  20
compiled vars:  !0 = $nf, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'NumberFormatter'
          1        SEND_VAL_EX                                              'en'
          2        FETCH_CLASS_CONSTANT                             ~3      'NumberFormatter', 'CURRENCY'
          3        SEND_VAL_EX                                              ~3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
    5     6        INIT_METHOD_CALL                                         !0, 'setAttribute'
          7        FETCH_CLASS_CONSTANT                             ~6      'NumberFormatter', 'FRACTION_DIGITS'
          8        SEND_VAL_EX                                              ~6
          9        SEND_VAL_EX                                              0
         10        DO_FCALL                                      0          
    9    11        INIT_METHOD_CALL                                         !0, 'formatCurrency'
         12        SEND_VAL_EX                                              1234
         13        SEND_VAL_EX                                              'GBP'
         14        DO_FCALL                                      0  $8      
         15      > RETURN                                                   $8
         16*       JMP                                                      ->19
   11    17  E > > CATCH                                       last         'Exception'
   13    18    > > RETURN                                                   '-'
   14    19*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.88 ms | 1393 KiB | 13 Q