3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TextTest { public function entities($str) { return htmlentities($str); } } $answerset = array('answers'=>array(50=>array('answerlong'=>'some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!some super long crazy long string that really shouldn\'t be so long, but it is anyway!'))); $text = new TextTest(); ob_start(); $time = microtime(1); $i = 0; while($i++ < 10000) echo'<td>',$text->entities($answerSet['answers'][$questionId]['answerLong']),'</td>'; ob_end_clean(); echo (microtime(1)-$time)." seconds for commas"; echo "\n"; ob_start(); $time = microtime(1); $i = 0; while($i++ < 10000) echo'<td>'.$text->entities($answerSet['answers'][$questionId]['answerLong']).'</td>'; ob_end_clean(); echo (microtime(1)-$time)." seconds for dot";

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)
7.4.10.0160.08322.45
7.4.00.0100.11022.27
7.3.130.0070.06016.27
7.3.120.0100.05716.22
7.3.110.0130.03515.94
7.3.100.0070.03316.22
7.3.90.0090.03816.28
7.3.80.0030.03716.48
7.3.70.0070.04016.17
7.3.60.0070.04016.13
7.3.50.0060.03516.24
7.3.40.0030.04816.23
7.3.30.0030.04916.29
7.3.20.0030.04216.74
7.3.10.0000.04216.83
7.3.00.0070.05116.79
7.2.260.0100.05916.56
7.2.250.0100.05916.42
7.2.240.0070.03816.51
7.2.230.0070.04316.63
7.2.220.0070.04616.11
7.2.210.0030.04916.52
7.2.200.0100.03716.35
7.2.190.0030.04416.32
7.2.180.0030.04116.39
7.2.170.0100.03716.36
7.2.160.0000.04016.57
7.2.150.0090.03516.77
7.2.140.0070.04616.78
7.2.130.0050.04116.97
7.2.120.0100.04116.86
7.2.110.0030.04116.77
7.2.100.0070.04616.89
7.2.90.0020.03817.01
7.2.80.0080.03717.04
7.2.70.0050.03917.05
7.2.60.0030.04316.89
7.2.50.0030.04316.80
7.2.40.0130.03517.02
7.2.30.0070.03816.94
7.2.20.0080.03617.09
7.2.10.0070.03916.98
7.2.00.0070.03917.58
7.1.330.0030.04515.91
7.1.320.0100.03915.80
7.1.310.0000.04715.65
7.1.300.0030.04415.54
7.1.290.0090.03815.77
7.1.280.0030.04115.71
7.1.270.0060.04215.86
7.1.260.0000.04915.60
7.1.250.0070.04215.69
7.1.240.0070.04815.54
7.1.230.0030.04415.72
7.1.220.0070.06515.61
7.1.210.0070.04315.74
7.1.200.0030.04015.88
7.1.190.0030.04315.74
7.1.180.0060.04116.04
7.1.170.0000.04615.79
7.1.160.0030.04415.76
7.1.150.0100.03915.71
7.1.140.0070.04015.56
7.1.130.0100.04615.71
7.1.120.0030.04215.83
7.1.110.0070.03915.75
7.1.100.0030.04915.86
7.1.90.0030.04815.87
7.1.80.0070.04315.73
7.1.70.0030.03716.54
7.1.60.0130.04417.59
7.1.50.0050.04516.38
7.1.40.0000.05315.55
7.1.30.0000.04915.94
7.1.20.0130.03715.74
7.1.10.0030.04315.93
7.1.00.0070.07219.13
7.0.330.0070.04615.11
7.0.320.0030.06115.34
7.0.310.0100.04315.41
7.0.300.0070.04115.43
7.0.290.0030.04415.45
7.0.280.0000.04315.43
7.0.270.0100.03615.45
7.0.260.0000.04515.41
7.0.250.0040.04615.52
7.0.240.0060.03515.39
7.0.230.0100.03915.45
7.0.220.0090.03815.58
7.0.210.0090.03515.57
7.0.200.0060.03516.04
7.0.190.0070.04315.28
7.0.180.0030.03915.58
7.0.170.0030.04815.29
7.0.160.0030.04915.27
7.0.150.0030.05015.38
7.0.140.0030.07518.72
7.0.130.0100.04115.55
7.0.120.0000.04615.38
7.0.110.0000.04615.62
7.0.100.0000.04915.54
7.0.90.0090.04415.42
7.0.80.0060.03515.43
7.0.70.0030.07618.58
7.0.60.0070.08018.63
7.0.50.0100.06718.81
7.0.40.0030.05816.81
7.0.30.0030.08316.84
7.0.20.0080.07616.90
7.0.10.0070.06916.81
7.0.00.0050.08016.88
5.6.400.0100.06915.86
5.6.390.0100.04515.75
5.6.380.0030.05016.07
5.6.370.0100.04916.19
5.6.360.0100.04915.58
5.6.350.0100.05415.91
5.6.340.0100.05216.04
5.6.330.0070.04616.16
5.6.320.0070.05715.93
5.6.310.0060.04715.79
5.6.300.0130.03916.02
5.6.290.0070.05715.74
5.6.280.0120.07718.96
5.6.270.0100.05516.07
5.6.260.0000.05415.72
5.6.250.0000.05615.92
5.6.240.0070.05115.59
5.6.230.0130.03915.71
5.6.220.0070.07018.99
5.6.210.0050.08418.81
5.6.200.0080.08319.14
5.6.190.0120.08919.05
5.6.180.0000.10319.10
5.6.170.0000.09319.13
5.6.160.0070.09118.96
5.6.150.0020.07919.11
5.6.140.0100.06319.21
5.6.130.0050.08620.65
5.6.120.0050.08819.06
5.6.110.0030.06719.13
5.6.100.0050.05719.12
5.6.90.0080.06819.03
5.6.80.0030.05918.80
5.6.70.0070.05718.65
5.6.60.0080.06020.14
5.6.50.0050.07218.73
5.6.40.0070.05918.78
5.6.30.0020.06218.73
5.6.20.0020.06118.78
5.6.10.0050.06918.83
5.6.00.0100.05118.79
5.5.380.0070.04815.61
5.5.370.0070.04815.75
5.5.360.0070.08618.69
5.5.350.0070.06718.83
5.5.340.0050.06118.95
5.5.330.0030.08819.07
5.5.320.0050.08918.89
5.5.310.0030.09118.99
5.5.300.0030.08518.89
5.5.290.0070.06118.73
5.5.280.0130.07618.94
5.5.270.0050.06418.77
5.5.260.0050.05718.77
5.5.250.0050.05920.52
5.5.240.0030.07518.63
5.5.230.0070.06418.59
5.5.220.0130.07518.74
5.5.210.0080.07818.50
5.5.200.0050.07618.67
5.5.190.0020.05818.56
5.5.180.0030.07218.48
5.5.170.0100.06115.62
5.5.160.0030.05618.54
5.5.150.0030.06318.56
5.5.140.0050.07518.64
5.5.130.0070.05318.63
5.5.120.0030.06818.45
5.5.110.0070.05518.44
5.5.100.0130.04918.54
5.5.90.0050.07518.65
5.5.80.0080.05018.55
5.5.70.0100.05618.40
5.5.60.0050.05718.61
5.5.50.0030.07318.70
5.5.40.0080.07418.57
5.5.30.0030.08018.44
5.5.20.0020.06018.31
5.5.10.0130.07018.54
5.5.00.0080.07718.51
5.4.450.0020.09316.97
5.4.440.0020.06217.11
5.4.430.0070.06217.11
5.4.420.0060.05716.98
5.4.410.0020.05617.10
5.4.400.0050.05316.86
5.4.390.0020.05716.95
5.4.380.0050.06116.90
5.4.370.0020.06017.00
5.4.360.0050.05616.95
5.4.350.0050.05416.93
5.4.340.0100.06316.90
5.4.330.0060.05113.46
5.4.320.0070.05316.90
5.4.310.0030.05616.83
5.4.300.0020.06616.90
5.4.290.0030.07116.86
5.4.280.0030.05717.00
5.4.270.0050.05816.97
5.4.260.0030.05216.94
5.4.250.0050.05516.98
5.4.240.0030.05416.90
5.4.230.0030.05916.99
5.4.220.0020.06316.94
5.4.210.0050.08216.95
5.4.200.0080.05816.90
5.4.190.0050.07516.82
5.4.180.0070.08316.94
5.4.170.0080.08016.96
5.4.160.0070.07116.96
5.4.150.0070.08016.97
5.4.140.0020.07615.68
5.4.130.0020.08015.61
5.4.120.0050.06315.61
5.4.110.0080.07115.59
5.4.100.0050.08015.64
5.4.90.0100.07815.63
5.4.80.0020.08515.62
5.4.70.0050.07815.65
5.4.60.0020.08415.53
5.4.50.0050.06115.59
5.4.40.0050.06715.59
5.4.30.0050.05715.64
5.4.20.0020.08215.55
5.4.10.0050.08415.52
5.4.00.0050.08415.34
5.3.290.0080.05614.84
5.3.280.0020.06214.79
5.3.270.0020.06214.76
5.3.260.0050.09414.82
5.3.250.0110.07814.83
5.3.240.0030.08114.81
5.3.230.0020.09214.81
5.3.220.0050.09214.78
5.3.210.0020.08614.71
5.3.200.0050.09414.73
5.3.190.0080.07814.73
5.3.180.0000.06714.77
5.3.170.0050.08714.73
5.3.160.0080.08014.81
5.3.150.0030.08414.73
5.3.140.0050.08514.78
5.3.130.0060.08614.78
5.3.120.0070.06014.74
5.3.110.0070.07414.79
5.3.100.0050.07614.46
5.3.90.0030.06114.45
5.3.80.0020.08814.47
5.3.70.0050.08414.50
5.3.60.0070.08414.50
5.3.50.0100.06014.39
5.3.40.0070.08514.44
5.3.30.0030.08614.46
5.3.20.0120.07414.35
5.3.10.0050.08114.33
5.3.00.0050.08714.28
5.2.170.0000.11312.52
5.2.160.0030.10312.67
5.2.150.0100.10312.62
5.2.140.0030.10012.54
5.2.130.0070.10712.50
5.2.120.0000.11312.61
5.2.110.0070.11312.60
5.2.100.0000.09012.61
5.2.90.0100.10712.63
5.2.80.0030.11012.68
5.2.70.0170.10312.57
5.2.60.0070.10012.43
5.2.50.0030.11312.42
5.2.40.0070.06015.59
5.2.30.0070.10312.55
5.2.20.0070.10012.51
5.2.10.0000.11012.47
5.2.00.0070.10312.32
5.1.60.0100.08712.22
5.1.50.0030.09712.22
5.1.40.0000.10012.22
5.1.30.0000.10012.22
5.1.20.0030.09712.22
5.1.10.0070.08312.22
5.1.00.0030.06012.22
5.0.50.0000.09712.22
5.0.40.0070.05312.22
5.0.30.0000.08712.22
5.0.20.0030.09712.22
5.0.10.0000.10312.22
5.0.00.0070.11312.22
4.4.90.0000.02012.22
4.4.80.0000.02312.22
4.4.70.0030.03712.22
4.4.60.0030.03312.22
4.4.50.0100.02712.22
4.4.40.0030.04712.22
4.4.30.0000.03312.22
4.4.20.0100.02712.22
4.4.10.0000.03712.22
4.4.00.0000.03012.22
4.3.110.0000.04012.22
4.3.100.0000.03312.22
4.3.90.0030.03312.22
4.3.80.0070.04012.22
4.3.70.0000.02012.22
4.3.60.0000.03312.22
4.3.50.0000.03312.22
4.3.40.0030.04712.22
4.3.30.0130.02712.22
4.3.20.0000.03312.22
4.3.10.0000.04012.22
4.3.00.0030.03312.22

preferences:
42.61 ms | 401 KiB | 5 Q