3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $discount = 33; $sale_end = '2014-01-30 00:00:00'; $date->setDate($sale_end); echo sprintf('%d%% OFF Ends %s', $discount, ($sale_end) ? $date->format('F d') : '');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rATC5
function name:  (null)
number of ops:  22
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, '2014-01-30+00%3A00%3A00'
    7     5        INIT_METHOD_CALL                                         !0, 'setDate'
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
    9     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 '%25d%25%25+OFF+Ends+%25s'
         10        SEND_VAR                                                 !1
         11      > JMPZ                                                     !2, ->17
         12    >   INIT_METHOD_CALL                                         !0, 'format'
         13        SEND_VAL_EX                                              'F+d'
         14        DO_FCALL                                      0  $9      
         15        QM_ASSIGN                                        ~10     $9
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~10     ''
         18    >   SEND_VAL                                                 ~10
         19        DO_ICALL                                         $11     
         20        ECHO                                                     $11
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1395 KiB | 15 Q