3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data[0] = (object) array( 'time' => '1403071646', 'netin' => '17.75', 'netout' => '22.5' ); $data[1] = (object) array( 'time' => '1403071647', 'netin' => '17.75', 'netout' => '22.5' ); $data[2] = (object) array( 'time' => '1403071649', 'netin' => '17.75', 'netout' => '22.5' ); // trying to make lines 15-19 become the following: // $output .= "{'x':'".date('Y-m-d H:i:s', $stat->time)."','y':'".number_format(round($stat->netin) / 1024, 2)."','z':'".number_format(round($stat->netout) / 1024, 2)."'}"; function chart_data($data, $items) { $count = count($data); $i = 1; $output = ''; foreach ($data as $stat) { $output .= '{'; foreach ($items as $key => $func) { $output .= "'".$key."':'".$func($stat)."'"; } $output .= '}'; if ($i < $count) { $output .= ","; } $output .= "\n"; $i++; } echo $output; } $items = array( 'x' => function ($stat) { return date('Y-m-d H:i:s', $stat['time']); }, 'y' => function ($stat) { return number_format(round($stat['netin']) / 1024, 2); }, 'z' => function ($stat) { return number_format(round($stat['netout']) / 1024, 2); } ); chart_data($data, $items);

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.0090.00616.75
8.3.50.0070.00922.13
8.3.40.0070.01318.75
8.3.30.0090.00619.17
8.3.20.0070.00020.21
8.3.10.0030.00623.71
8.3.00.0060.00319.13
8.2.180.0120.00916.88
8.2.170.0100.00722.96
8.2.160.0140.00020.38
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00620.37
8.2.110.0060.00321.92
8.2.100.0070.00717.78
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0070.00317.63
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00320.07
8.2.30.0040.00418.40
8.2.20.0020.00517.79
8.2.10.0000.00818.05
8.2.00.0000.00717.83
8.1.280.0070.00725.92
8.1.270.0040.00423.95
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00023.88
8.1.230.0100.00019.14
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0060.00318.42
8.1.160.0020.00522.03
8.1.150.0040.00418.52
8.1.140.0080.00017.47
8.1.130.0030.00317.90
8.1.120.0000.00717.38
8.1.110.0020.00517.38
8.1.100.0000.00817.54
8.1.90.0000.00717.52
8.1.80.0070.00017.50
8.1.70.0000.00717.43
8.1.60.0040.00417.66
8.1.50.0080.00317.49
8.1.40.0040.00417.50
8.1.30.0000.01117.52
8.1.20.0050.00317.62
8.1.10.0050.00617.61
8.1.00.0000.00817.53
8.0.300.0000.00718.77
8.0.290.0000.00717.18
8.0.280.0040.00418.46
8.0.270.0000.00717.21
8.0.260.0030.00517.19
8.0.250.0000.00717.08
8.0.240.0030.00317.02
8.0.230.0040.00416.98
8.0.220.0030.00316.85
8.0.210.0070.00016.83
8.0.200.0000.00716.87
8.0.190.0070.00016.93
8.0.180.0070.00317.02
8.0.170.0070.00016.92
8.0.160.0040.00417.02
8.0.150.0030.00516.84
8.0.140.0050.00216.79
8.0.130.0030.00313.44
8.0.120.0040.00416.89
8.0.110.0070.00016.86
8.0.100.0040.00416.97
8.0.90.0070.00017.02
8.0.80.0130.01016.89
8.0.70.0040.00416.87
8.0.60.0070.00017.01
8.0.50.0040.00416.86
8.0.30.0060.01217.23
8.0.20.0100.01017.40
8.0.10.0040.00416.98
8.0.00.0100.00916.74
7.4.330.0000.00515.00
7.4.320.0000.00716.62
7.4.300.0000.00716.56
7.4.290.0070.00016.59
7.4.280.0050.00216.61
7.4.270.0040.00416.59
7.4.260.0040.00416.54
7.4.250.0000.01016.59
7.4.240.0040.00416.60
7.4.230.0070.00016.64
7.4.220.0130.00416.48
7.4.210.0080.00616.65
7.4.200.0040.00416.59
7.4.190.0000.00716.67
7.4.160.0080.00816.43
7.4.150.0150.00317.40
7.4.140.0100.00817.86
7.4.130.0140.00316.64
7.4.120.0050.01116.68
7.4.110.0070.01016.59
7.4.100.0070.01316.46
7.4.90.0080.00816.55
7.4.80.0070.01719.39
7.4.70.0060.01016.61
7.4.60.0100.00616.56
7.4.50.0000.00516.55
7.4.40.0110.00616.55
7.4.30.0140.00316.66
7.4.10.0060.01114.68
7.4.00.0060.01015.00
7.3.330.0050.00013.36
7.3.320.0000.00513.37
7.3.310.0070.00016.46
7.3.300.0030.00316.29
7.3.290.0110.00316.42
7.3.280.0130.00516.43
7.3.270.0090.00917.40
7.3.260.0130.00916.50
7.3.250.0130.00516.54
7.3.240.0060.01316.38
7.3.230.0050.01116.40
7.3.210.0100.00716.51
7.3.200.0090.01519.39
7.3.190.0080.00916.38
7.3.180.0060.00916.63
7.3.170.0030.01216.43
7.3.160.0090.00616.38
7.3.130.0040.01115.13
7.3.120.0070.01014.86
7.3.110.0030.01514.87
7.3.100.0060.00615.09
7.3.90.0030.00714.65
7.3.80.0070.00714.69
7.3.70.0040.00714.60
7.3.60.0100.00314.60
7.3.50.0000.01314.95
7.3.40.0080.00314.71
7.3.30.0000.01114.87
7.3.20.0060.00616.81
7.3.10.0080.00816.64
7.3.00.0050.00816.59
7.2.330.0100.00716.70
7.2.320.0090.00916.80
7.2.310.0070.01016.74
7.2.300.0160.00016.77
7.2.290.0100.01016.64
7.2.260.0070.00715.04
7.2.250.0090.00915.10
7.2.240.0070.01014.82
7.2.230.0000.01415.21
7.2.220.0060.00915.04
7.2.210.0060.00914.99
7.2.200.0090.00315.08
7.2.190.0060.00914.79
7.2.180.0040.01515.18
7.2.170.0000.01015.23
7.2.160.0030.00715.09
7.2.150.0030.00716.79
7.2.140.0000.00917.05
7.2.130.0070.00516.88
7.2.120.0070.00716.82
7.2.110.0020.00916.70
7.2.100.0040.00716.92
7.2.90.0070.00516.84
7.2.80.0100.00416.88
7.2.70.0070.00516.99
7.2.60.0070.00616.84
7.2.50.0080.00516.89
7.2.40.0050.00816.78
7.2.30.0040.00917.11
7.2.20.0120.00316.93
7.2.10.0100.00616.83
7.2.00.0060.00617.81
7.1.330.0060.00615.91
7.1.320.0000.01615.75
7.1.310.0080.00615.70
7.1.300.0040.01115.74
7.1.290.0030.01016.00
7.1.280.0110.00415.88
7.1.270.0040.00415.79
7.1.260.0100.00315.56
7.1.250.0050.00415.54
7.1.240.0070.00716.06
7.1.230.0070.00315.89
7.1.220.0040.00715.77
7.1.210.0060.00915.67
7.1.200.0060.00515.75
7.1.190.0060.00615.97
7.1.180.0100.00716.01
7.1.170.0000.01315.64
7.1.160.0110.00415.48
7.1.150.0000.01515.96
7.1.140.0120.00315.88
7.1.130.0060.01015.96
7.1.120.0030.01015.84
7.1.110.0060.00615.97
7.1.100.0060.00717.10
7.1.90.0110.00415.71
7.1.80.0030.01315.63
7.1.70.0090.00216.50
7.1.60.0100.00917.62
7.1.50.0050.01516.46
7.1.40.0000.01115.61
7.1.30.0040.00715.79
7.1.20.0030.01015.79
7.1.10.0030.01415.59
7.1.00.0050.04319.11
7.0.330.0040.01115.42
7.0.320.0080.00715.36
7.0.310.0060.00315.39
7.0.300.0000.00915.61
7.0.290.0050.00815.37
7.0.280.0070.00315.41
7.0.270.0080.00815.25
7.0.260.0060.00615.24
7.0.250.0060.00615.15
7.0.240.0030.00915.60
7.0.230.0060.01015.21
7.0.220.0070.00715.48
7.0.210.0100.00315.41
7.0.200.0030.00916.12
7.0.190.0120.00415.32
7.0.180.0000.01015.56
7.0.170.0100.00315.36
7.0.160.0030.00715.20
7.0.150.0030.00915.52
7.0.140.0080.03518.78
7.0.130.0080.00415.43
7.0.120.0060.00615.49
7.0.110.0070.00715.50
7.0.100.0070.00715.17
7.0.90.0090.02718.62
7.0.80.0040.04918.50
7.0.70.0070.04418.46
7.0.60.0050.03718.60
7.0.50.0020.03118.83
7.0.40.0040.02516.74
7.0.30.0100.04116.69
7.0.20.0000.03316.79
7.0.10.0100.04116.82
7.0.00.0080.04116.60
5.6.400.0030.00714.59
5.6.390.0060.00614.77
5.6.380.0060.00814.63
5.6.370.0070.00414.27
5.6.360.0060.00914.43
5.6.350.0030.01014.33
5.6.340.0060.00614.04
5.6.330.0120.00314.57
5.6.320.0000.01314.51
5.6.310.0070.00714.50
5.6.300.0120.00314.58
5.6.290.0030.00914.53
5.6.280.0080.03617.82
5.6.270.0140.00014.52
5.6.260.0120.00014.36
5.6.250.0000.01414.49
5.6.240.0040.04717.52
5.6.230.0060.02517.62
5.6.220.0070.02217.64
5.6.210.0050.02817.53
5.6.200.0070.04317.66
5.6.190.0050.02917.90
5.6.180.0080.03717.67
5.6.170.0120.04317.82
5.6.160.0050.04717.72
5.6.150.0090.04217.86
5.6.140.0050.04717.64
5.6.130.0050.03817.75
5.6.120.0070.04617.87
5.6.110.0050.04717.75
5.6.100.0040.04717.69
5.6.90.0070.03617.79
5.6.80.0060.02317.35
5.6.70.0030.04217.47
5.6.60.0030.04117.29
5.6.50.0080.03817.29
5.6.40.0050.04817.50
5.6.30.0030.02617.48
5.6.20.0050.02817.34
5.6.10.0050.03817.39
5.6.00.0030.02717.41
5.5.380.0030.04217.41
5.5.370.0030.03617.54
5.5.360.0030.04617.48
5.5.350.0020.05217.46
5.5.340.0040.02717.66
5.5.330.0030.04517.64
5.5.320.0060.04117.51
5.5.310.0080.04617.61
5.5.300.0000.03117.79
5.5.290.0020.04817.54
5.5.280.0030.03517.64
5.5.270.0050.04817.53
5.5.260.0070.04817.66
5.5.250.0050.04617.65
5.5.240.0050.03817.17
5.5.230.0050.04617.27
5.5.220.0050.04517.27
5.5.210.0090.04417.36
5.5.200.0050.04417.32
5.5.190.0050.04417.32
5.5.180.0090.03717.30
5.5.170.0050.00514.54
5.5.160.0110.03917.20
5.5.150.0080.04217.26
5.5.140.0060.02917.36
5.5.130.0070.04217.35
5.5.120.0050.02617.31
5.5.110.0070.04217.06
5.5.100.0050.03117.16
5.5.90.0050.02917.29
5.5.80.0060.02117.32
5.5.70.0070.03917.29
5.5.60.0090.03817.28
5.5.50.0070.03417.29
5.5.40.0050.04417.14
5.5.30.0000.04517.26
5.5.20.0070.04117.19
5.5.10.0030.04517.32
5.5.00.0030.05116.97
5.4.450.0040.03015.72
5.4.440.0080.03815.72
5.4.430.0070.03515.84
5.4.420.0050.04115.86
5.4.410.0050.04015.78
5.4.400.0030.02215.56
5.4.390.0060.04015.73
5.4.380.0050.02615.68
5.4.370.0020.04015.65
5.4.360.0030.03215.61
5.4.350.0080.03815.55
5.4.340.0040.04015.70
5.4.330.0030.00712.26
5.4.320.0040.03915.66
5.4.310.0050.02215.70
5.4.300.0040.02615.65
5.4.290.0040.02315.69
5.4.280.0100.02715.72
5.4.270.0030.04215.69
5.4.260.0070.03315.70
5.4.250.0030.04515.67
5.4.240.0030.03515.65
5.4.230.0030.02315.67
5.4.220.0080.03815.73
5.4.210.0000.04015.69
5.4.200.0050.03215.69
5.4.190.0000.02615.65
5.4.180.0060.02015.71
5.4.170.0050.04015.69
5.4.160.0030.04215.64
5.4.150.0070.04115.64
5.4.140.0080.03614.40
5.4.130.0020.04214.27
5.4.120.0050.02814.37
5.4.110.0030.04314.29
5.4.100.0050.03414.34
5.4.90.0050.03314.37
5.4.80.0100.02014.33
5.4.70.0050.04014.37
5.4.60.0030.04014.30
5.4.50.0080.03514.36
5.4.40.0050.03814.33
5.4.30.0050.02214.36
5.4.20.0040.02914.38
5.4.10.0060.03814.36
5.4.00.0070.02314.02
5.3.290.0040.02413.50
5.3.280.0040.04313.44
5.3.270.0060.02613.45
5.3.260.0040.02813.47
5.3.250.0100.03513.44
5.3.240.0030.02813.49
5.3.230.0030.03713.40
5.3.220.0090.03213.49
5.3.210.0050.04013.39
5.3.200.0070.02713.43
5.3.190.0070.02813.47
5.3.180.0030.04313.49
5.3.170.0030.04313.45
5.3.160.0050.04013.38
5.3.150.0070.02313.46
5.3.140.0060.03113.40
5.3.130.0000.03013.36
5.3.120.0050.03413.39
5.3.110.0050.03713.38
5.3.100.0050.03313.19
5.3.90.0020.04213.14
5.3.80.0070.03513.19
5.3.70.0050.02213.20
5.3.60.0030.04013.17
5.3.50.0060.02413.15
5.3.40.0030.02313.05
5.3.30.0050.03313.12
5.3.20.0020.03412.97
5.3.10.0030.03313.01
5.3.00.0070.03612.92
5.2.170.0030.06011.13
5.2.160.0030.04311.21
5.2.150.0000.03011.23
5.2.140.0000.05311.20
5.2.130.0030.03011.04
5.2.120.0000.05711.09
5.2.110.0030.06011.16
5.2.100.0030.06011.15
5.2.90.0030.06311.24
5.2.80.0030.05711.02
5.2.70.0000.06311.09
5.2.60.0070.02711.06
5.2.50.0030.03310.91
5.2.40.0000.03011.02
5.2.30.0030.02710.96
5.2.20.0000.03011.05
5.2.10.0070.02310.96
5.2.00.0070.02010.74
5.1.60.0030.02010.54
5.1.50.0030.02010.54
5.1.40.0000.02710.54
5.1.30.0000.02710.54
5.1.20.0000.02310.54
5.1.10.0030.02310.54
5.1.00.0030.02310.54
5.0.50.0000.03010.54
5.0.40.0000.02010.54
5.0.30.0000.03010.54
5.0.20.0000.02010.54
5.0.10.0000.02010.54
5.0.00.0030.03710.54
4.4.90.0000.02310.54
4.4.80.0030.01310.54
4.4.70.0030.01310.54
4.4.60.0000.01710.54
4.4.50.0030.01310.54
4.4.40.0000.02010.54
4.4.30.0000.01710.54
4.4.20.0030.01010.54
4.4.10.0070.00710.54
4.4.00.0000.02310.54
4.3.110.0030.02010.54
4.3.100.0030.01710.54
4.3.90.0000.02010.54
4.3.80.0000.03010.54
4.3.70.0000.01710.54
4.3.60.0000.01310.54
4.3.50.0000.01310.54
4.3.40.0030.04310.54
4.3.30.0000.03310.54
4.3.20.0030.01710.54
4.3.10.0030.02710.54
4.3.00.0000.01310.54

preferences:
51.49 ms | 401 KiB | 5 Q