3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test ="1,500.00"; $montant=rtrim(rtrim($test,',00'), '.00')*100; echo $montant;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/57EY2
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test, !1 = $montant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1%2C500.00'
    4     1        INIT_FCALL                                               'rtrim'
          2        INIT_FCALL                                               'rtrim'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%2C00'
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        SEND_VAL                                                 '.00'
          8        DO_ICALL                                         $4      
          9        MUL                                              ~5      $4, 100
         10        ASSIGN                                                   !1, ~5
    6    11        ECHO                                                     !1
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.81 ms | 1394 KiB | 15 Q