3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number1 = 354.2550; $number2 = 38456.12; echo strlen(substr(strrchr($number1, "."), 1)) . "<br />"; echo strlen(substr(strrchr($number2, "."), 1)); //echo number_format(round(3.2550, 2), 2, ',', '.') + 0; //echo PHP_EOL; //echo number_format(round(3.4000, 2), 2, ',', '.') + 0;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sZSPM
function name:  (null)
number of ops:  24
compiled vars:  !0 = $number1, !1 = $number2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 354.255
    3     1        ASSIGN                                                   !1, 38456.1
    5     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'strrchr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '.'
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $5      
         10        STRLEN                                           ~6      $5
         11        CONCAT                                           ~7      ~6, '%3Cbr+%2F%3E'
         12        ECHO                                                     ~7
    6    13        INIT_FCALL                                               'substr'
         14        INIT_FCALL                                               'strrchr'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 '.'
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $9      
         21        STRLEN                                           ~10     $9
         22        ECHO                                                     ~10
   10    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1395 KiB | 17 Q