3v4l.org

run code in 300+ PHP versions simultaneously
<?php include "./classes.php"; include "./texts.php"; $db = new Db(); // TASK PROCCESSING $tasks_proccessing = $db->select("SELECT t.id as idt, c.name as namec, m.name as namem, c.id as idc, DATE_FORMAT(t.start, '%d %b - %H:%i') as start, DATE_FORMAT(t.finish, '%d %b - %H:%i:%s') as finish, timediff(curtime(),date_format(t.finish,'%H:%i:%s')) as diferencia FROM clients c, tasks t, machines m WHERE t.machine_id = m.id AND t.client_id = c.id AND c.id = t.client_id AND (t.finish is NULL or (DATE(t.finish) = CURDATE())) ORDER BY t.id desc"); // START TASKS PROCCESSING--> if (empty($tasks_proccessing)) { echo '<div class="alert alert-warning text-center" role="alert"><strong>'.$tnotasks.'</strong></div>'; }else{ ?> <table class="table"> <thead> <tr class="active"> <th>#</th> <th>Client</th> <th>Machine</th> <th>Start</th> <th>State</th> </tr> </thead> <tbod> <?php foreach ($tasks_proccessing as $thetask) { if (empty($thetask["finish"])){ $classtouse="warning"; $content = "Work in Progress"; }else{ $classtouse="success"; $content = $thetask["finish"]; if ($thetask["diferencia"]<'00:00:06'){ $content .= '<audio autoplay="autoplay"> <source src="ding.ogg" type="audio/ogg"><source src="ding.mp3" type="audio/mpeg"> Your browser does not support the audio element.</audio>'; $content .= '&nbsp;&nbsp;<span class="glyphicon glyphicon-thumbs-up text-warning" aria-hidden="true"></span>'; } } ?> <tr class="<?php echo $classtouse; ?>"> <th scope="row"><?php echo $thetask["idt"]; ?></th> <td><?php echo $thetask["namec"]; ?></td> <td><?php echo $thetask["namem"]; ?></td> <td><?php echo $thetask["start"]; ?></td> <td><?php echo $content; ?></td> </tr> <?php } //END FOREACH?> </tbody> </table> <?php } // START SCARTO PROCCESSING--> /*if (empty($scarto_proccessing)) { echo '<div class="alert alert-warning text-center" role="alert"><strong>'.$tnoscarto.'</strong></div>'; }else{ */?> <table class="table"> <thead> <tr class="active"> <th>#</th> <th>Client</th> <th class="text-center">Scarto</th> </tr> </thead> <tbod> <?php $clients = $db->select("SELECT DISTINCT c.name as namec, c.id as idc FROM clients c, scarto s WHERE s.client_id = c.id AND (DATE(s.created) = CURDATE()) ORDER BY c.name desc"); foreach ($clients as $client) { ?> <tr class="danger"> <th scope="row"></th> <td><?php echo $client["namec"]; ?></td> <td> <table class="table"> <thead> <tr class="active"> <th>Sporco</th> <th>Rotto</th> </tr> </thead> <tbod> <?php $scarto_proccessing = $db->select("SELECT a.name as namea, c.name as namec, c.id as idc, sum(s.quantity_sporco) as qs, sum(s.quantity_rotto) as qr, DATE_FORMAT(s.created, '%d %b - %H:%i') as created FROM clients c, scarto s, articles a WHERE a.id = s.article_id AND s.client_id = c.id AND c.id = ".$client["idc"]." AND (DATE(s.created) = CURDATE()) GROUP BY a.id ORDER BY a.name desc"); foreach ($scarto_proccessing as $thescarto) { ?> <tr> <td><?php echo $thescarto["namea"]." - ".$thescarto["qs"]; ?></td> <td><?php echo $thescarto["namea"]." - ".$thescarto["qr"]; ?></td> </tr> <?php } ?> </tbod> </table> </td> </tr> <?php } //END FOREACH?> </tbody> </table> <?php //} ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0160.00316.88
8.3.50.0090.01321.21
8.3.40.0150.00618.95
8.3.30.0060.00918.92
8.3.20.0040.00420.16
8.3.10.0040.00421.85
8.3.00.0040.00419.66
8.2.180.0180.00316.48
8.2.170.0120.00322.96
8.2.160.0000.01420.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.50
8.2.110.0030.00621.03
8.2.100.0090.00317.78
8.2.90.0050.00319.07
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0100.00217.80
8.2.50.0100.00018.07
8.2.40.0000.00919.16
8.2.30.0000.00821.30
8.2.20.0070.00017.88
8.2.10.0040.00418.13
8.2.00.0070.00018.10
8.1.280.0000.01625.92
8.1.270.0050.00321.98
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00619.08
8.1.230.0090.00317.54
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0060.00317.34
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0000.00821.98
8.1.150.0040.00418.83
8.1.140.0000.00817.47
8.1.130.0070.00017.73
8.1.120.0000.00717.46
8.1.110.0050.00217.46
8.1.100.0030.00517.43
8.1.90.0040.00417.48
8.1.80.0030.00617.33
8.1.70.0000.00717.52
8.1.60.0030.00617.54
8.1.50.0090.00017.54
8.1.40.0070.00417.55
8.1.30.0000.00817.70
8.1.20.0000.00817.53
8.1.10.0040.00417.59
8.1.00.0040.00417.55
8.0.300.0060.00318.77
8.0.290.0060.00317.00
8.0.280.0040.00418.47
8.0.270.0030.00317.25
8.0.260.0000.00717.34
8.0.250.0040.00416.97
8.0.240.0030.00617.03
8.0.230.0030.00317.20
8.0.220.0040.00417.06
8.0.210.0040.00417.09
8.0.200.0080.00017.11
8.0.190.0080.00317.10
8.0.180.0000.00817.13
8.0.170.0040.00417.04
8.0.160.0040.00417.09
8.0.150.0050.00217.08
8.0.140.0000.00816.95
8.0.130.0030.00313.56
8.0.120.0000.00917.07
8.0.110.0030.00517.09
8.0.100.0000.00717.09
8.0.90.0040.00416.96
8.0.80.0070.01317.03
8.0.70.0000.00716.93
8.0.60.0050.00316.93
8.0.50.0070.00017.09
8.0.30.0100.00917.09
8.0.20.0110.00717.40
8.0.10.0040.00416.96
8.0.00.0110.00816.90
7.4.330.0050.00015.15
7.4.320.0030.00316.55
7.4.300.0030.00316.63
7.4.290.0000.00716.54
7.4.280.0000.00716.65
7.4.270.0000.01116.57
7.4.260.0000.00816.45
7.4.250.0040.00416.54
7.4.240.0020.00516.54
7.4.230.0000.00816.66
7.4.220.0100.01716.63
7.4.210.0060.00916.49
7.4.200.0030.00316.73
7.4.160.0130.00916.52
7.4.150.0060.01317.40
7.4.140.0090.01117.86
7.4.130.0080.01216.75
7.4.120.0100.00816.52
7.4.110.0100.01716.41
7.4.100.0120.01216.72
7.4.90.0180.00016.57
7.4.80.0160.00319.39
7.4.70.0100.00716.80
7.4.60.0100.00716.61
7.4.50.0000.00816.56
7.4.40.0050.01116.70
7.4.30.0160.00816.62
7.4.00.0040.00715.24
7.3.330.0000.00613.13
7.3.320.0050.00013.21
7.3.310.0000.00816.25
7.3.300.0050.00216.36
7.3.290.0030.00616.44
7.3.280.0050.01316.38
7.3.270.0030.01617.40
7.3.260.0090.01316.43
7.3.250.0100.00816.29
7.3.240.0110.01116.36
7.3.230.0040.01316.39
7.3.210.0180.00016.30
7.3.200.0060.01116.35
7.3.190.0070.01016.35
7.3.180.0050.01216.54
7.3.170.0110.00616.31
7.3.160.0080.01116.42
7.2.330.0060.01316.65
7.2.320.0100.00716.68
7.2.310.0040.01216.59
7.2.300.0100.00716.53
7.2.290.0070.01316.43
7.2.60.0060.00316.93
7.2.00.0030.01019.36
7.1.200.0040.00815.78
7.1.100.0000.00917.91
7.1.70.0000.00717.02
7.1.60.0070.00319.27
7.1.50.0130.01334.68
7.1.00.0070.07322.55
7.0.200.0040.00416.74
7.0.60.0000.08719.94
7.0.50.0030.04317.86
7.0.40.0070.05720.17
7.0.30.0470.06320.21
7.0.20.0230.04720.17
7.0.10.0130.05320.04
7.0.00.0100.03720.33
5.6.280.0100.05721.03
5.6.210.0170.03720.53
5.6.200.0130.08018.23
5.6.190.0030.07320.59
5.6.180.0330.05720.42
5.6.170.0230.04320.64
5.6.160.0000.05020.49
5.6.150.0000.06318.13
5.6.140.0030.04018.17
5.6.130.0070.05718.22
5.6.120.0170.07321.01
5.6.110.0100.08321.09
5.6.100.0100.06721.02
5.6.90.0130.07721.02
5.6.80.0070.07720.53
5.6.70.0170.07720.50
5.5.350.0070.08020.39
5.5.340.0030.04317.98
5.5.330.0070.04320.23
5.5.320.0270.08020.18
5.5.310.0130.05020.28
5.5.300.0130.08017.99
5.5.290.0130.07717.99
5.5.280.0030.04320.64
5.5.270.0000.04320.91
5.5.260.0100.07720.70
5.5.250.0030.04020.59
5.5.240.0000.07320.29
5.4.450.0200.06019.63
5.4.440.0200.06019.52
5.4.430.0230.06019.49
5.4.420.0330.06019.61
5.4.410.0330.05019.33
5.4.400.0170.06719.30
5.4.390.0230.07318.82
5.4.380.0300.06319.19
5.4.370.0230.05718.91
5.4.360.0170.06018.96
5.4.350.0300.05719.19
5.4.340.0400.05018.96
5.4.320.0230.05719.19
5.4.310.0330.04719.29
5.4.300.0130.06719.13
5.4.290.0600.06719.11
5.4.280.0270.06319.19
5.4.270.0330.06018.80
5.4.260.0400.04719.09
5.4.250.0370.05719.13
5.4.240.0300.06719.15
5.4.230.0200.05719.10
5.4.220.0270.06718.95
5.4.210.0130.06318.92
5.4.200.0270.05718.96
5.4.190.0400.05318.80
5.4.180.0270.05319.12
5.4.170.0300.06319.18
5.4.160.0300.06019.09
5.4.150.0270.06019.14
5.4.140.0330.05016.46
5.4.130.0370.06316.25
5.4.120.0230.05016.48
5.4.110.0230.06716.46
5.4.100.0500.03716.46
5.4.90.0300.06016.48
5.4.80.0200.06016.54
5.4.70.0370.05316.41
5.4.60.0330.03716.41
5.4.50.0070.04716.42
5.4.40.0100.06316.18
5.4.30.0070.03716.29
5.4.20.0300.03316.21

preferences:
63.46 ms | 401 KiB | 5 Q