3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(verify(12.4444)); function verify($number) { if (!$number || !is_numeric($number)) { return true; } list(, $decimal) = explode('.', $number); if (strlen($decimal) != 4) { return false; } return true; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BMmWQ
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL_BY_NAME                                       'verify'
          2        SEND_VAL_EX                                              12.4444
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   20     6      > RETURN                                                   1

Function verify:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/BMmWQ
function name:  verify
number of ops:  23
compiled vars:  !0 = $number, !1 = $decimal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        BOOL_NOT                                         ~2      !0
          2      > JMPNZ_EX                                         ~2      ~2, ->8
          3    >   INIT_FCALL                                               'is_numeric'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        BOOL_NOT                                         ~4      $3
          7        BOOL                                             ~2      ~4
          8    > > JMPZ                                                     ~2, ->10
   11     9    > > RETURN                                                   <true>
   14    10    >   INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '.'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        FETCH_LIST_R                                     $6      $5, 1
         15        ASSIGN                                                   !1, $6
         16        FREE                                                     $5
   15    17        STRLEN                                           ~8      !1
         18        IS_NOT_EQUAL                                             ~8, 4
         19      > JMPZ                                                     ~9, ->21
   16    20    > > RETURN                                                   <false>
   19    21    > > RETURN                                                   <true>
   20    22*     > RETURN                                                   null

End of function verify

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.94 ms | 1396 KiB | 19 Q