3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = 286; // Floor the minutes so we only get full minutes $mins = floor($total / 60); // Calculate how many secs are left $secs = $total - ($mins * 60); echo "$mins minutes and $secs seconds";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JA2l8c
function name:  (null)
number of ops:  15
compiled vars:  !0 = $total, !1 = $mins, !2 = $secs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 286
    5     1        INIT_FCALL                                               'floor'
          2        DIV                                              ~4      !0, 60
          3        SEND_VAL                                                 ~4
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    8     6        MUL                                              ~7      !1, 60
          7        SUB                                              ~8      !0, ~7
          8        ASSIGN                                                   !2, ~8
   10     9        ROPE_INIT                                     4  ~11     !1
         10        ROPE_ADD                                      1  ~11     ~11, '+minutes+and+'
         11        ROPE_ADD                                      2  ~11     ~11, !2
         12        ROPE_END                                      3  ~10     ~11, '+seconds'
         13        ECHO                                                     ~10
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.33 ms | 1009 KiB | 14 Q