3v4l.org

run code in 300+ PHP versions simultaneously
<?php $price = 10; if (preg_match('#\.00#',$price)) { echo "CHF " . (int)$price . ".-"; } else { echo "CHF " . $price; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jcsvr
function name:  (null)
number of ops:  14
compiled vars:  !0 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%5C.00%23'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->11
    4     6    >   CAST                                          4  ~3      !0
          7        CONCAT                                           ~4      'CHF+', ~3
          8        CONCAT                                           ~5      ~4, '.-'
          9        ECHO                                                     ~5
         10      > JMP                                                      ->13
    6    11    >   CONCAT                                           ~6      'CHF+', !0
         12        ECHO                                                     ~6
    7    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.87 ms | 1394 KiB | 15 Q