3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $discount = 33; $sale_end = ''; if($sale_end) { $date->modify($sale_end); } echo sprintf('%d%% OFF %s', $discount, ($sale_end) ? 'Ends ' . $date->format('F d') : '');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/poZmr
function name:  (null)
number of ops:  24
compiled vars:  !0 = $date, !1 = $discount, !2 = $sale_end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        ASSIGN                                                   !1, 33
    6     4        ASSIGN                                                   !2, ''
    7     5      > JMPZ                                                     !2, ->9
    8     6    >   INIT_METHOD_CALL                                         !0, 'modify'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
   11     9    >   INIT_FCALL                                               'sprintf'
         10        SEND_VAL                                                 '%25d%25%25+OFF+%25s'
         11        SEND_VAR                                                 !1
         12      > JMPZ                                                     !2, ->19
         13    >   INIT_METHOD_CALL                                         !0, 'format'
         14        SEND_VAL_EX                                              'F+d'
         15        DO_FCALL                                      0  $9      
         16        CONCAT                                           ~10     'Ends+', $9
         17        QM_ASSIGN                                        ~11     ~10
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~11     ''
         20    >   SEND_VAL                                                 ~11
         21        DO_ICALL                                         $12     
         22        ECHO                                                     $12
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.11 ms | 1387 KiB | 15 Q