3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $number = ['1,2', 1, '']; foreach ($number as $val) { if (!empty($val)) echo "val: $val is_numeric ".is_numeric(number_format($val))."\n\r"; } echo 'string:'.is_numeric(number_format('lalalal1,2'));
based on rbg95
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
Jump found. Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
Jump found. Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
Jump found. Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
Branch analysis from position: 19
Jump found. Position 1 = -2
Branch analysis from position: 19
filename:       /in/W2lC2
function name:  (null)
number of ops:  29
compiled vars:  !0 = $number, !1 = $val
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
   4     1      > FE_RESET_R                                       $3      !0, ->19
         2    > > FE_FETCH_R                                               $3, !1, ->19
   5     3    >   ISSET_ISEMPTY_VAR                           293601280  ~4      !1
         4        BOOL_NOT                                         ~5      ~4
         5      > JMPZ                                                     ~5, ->18
         6    >   ROPE_INIT                                     3  ~7      'val%3A+'
         7        ROPE_ADD                                      1  ~7      ~7, !1
         8        ROPE_END                                      2  ~6      ~7, '+is_numeric+'
         9        INIT_FCALL                                               'is_numeric'
        10        INIT_FCALL                                               'number_format'
        11        SEND_VAR                                                 !1
        12        DO_ICALL                                         $9      
        13        SEND_VAR                                                 $9
        14        DO_ICALL                                         $10     
        15        CONCAT                                           ~11     ~6, $10
        16        CONCAT                                           ~12     ~11, '%0A%0D'
        17        ECHO                                                     ~12
        18    > > JMP                                                      ->2
        19    >   FE_FREE                                                  $3
   7    20        INIT_FCALL                                               'is_numeric'
        21        INIT_FCALL                                               'number_format'
        22        SEND_VAL                                                 'lalalal1%2C2'
        23        DO_ICALL                                         $13     
        24        SEND_VAR                                                 $13
        25        DO_ICALL                                         $14     
        26        CONCAT                                           ~15     'string%3A', $14
        27        ECHO                                                     ~15
        28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0