3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("4","6","2","ololo"); $time = microtime(true); $i=0; while($i < 100000) { $i++; json_encode($arr); } $time1 = microtime(true) - $time; $time = microtime(true); $i=0; while($i < 100000) { $i++; serialize($arr); } $time2 = microtime(true) - $time; echo '1 took ' . number_format($time1, 3) . "\n"; echo '2 took ' . number_format($time2, 3) . "\n";

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.3.00.0070.05316.42
7.2.130.0000.06616.64
7.2.120.0030.06217.04
7.2.110.0000.06116.91
7.2.100.0070.05816.98
7.2.90.0100.06016.95
7.2.80.0070.06016.89
7.2.70.0070.05416.59
7.2.60.0030.05616.95
7.2.50.0070.05717.03
7.2.40.0160.05317.04
7.2.30.0070.05816.96
7.2.20.0100.05516.64
7.2.10.0100.05616.69
7.2.00.0030.04818.03
7.1.250.0100.07115.72
7.1.240.0070.07516.03
7.1.230.0070.07015.97
7.1.220.0030.08015.87
7.1.210.0030.07515.75
7.1.200.0070.07415.66
7.1.190.0000.07815.51
7.1.180.0070.07315.82
7.1.170.0100.07116.02
7.1.160.0030.07715.50
7.1.150.0100.06615.57
7.1.140.0100.07015.92
7.1.130.0070.06915.85
7.1.120.0030.07515.60
7.1.110.0000.07015.72
7.1.100.0070.07015.51
7.1.90.0030.07215.93
7.1.80.0060.06515.99
7.1.70.0050.05516.38
7.1.60.0050.07717.46
7.1.50.0070.07416.47
7.1.40.0070.06915.77
7.1.30.0070.06615.87
7.1.20.0030.07415.61
7.1.10.0030.07415.77
7.1.00.0030.08519.05
7.0.330.0030.07615.45
7.0.320.0000.08115.55
7.0.310.0070.07615.41
7.0.300.0070.07015.10
7.0.290.0030.07115.32
7.0.280.0100.07915.51
7.0.270.0130.06815.33
7.0.260.0030.07815.63
7.0.250.0070.06615.54
7.0.240.0000.08015.39
7.0.230.0000.07815.28
7.0.220.0030.07615.38
7.0.210.0000.08015.23
7.0.200.0070.05916.15
7.0.190.0070.07215.52
7.0.180.0070.07315.43
7.0.170.0030.07615.29
7.0.160.0060.07815.09
7.0.150.0070.07415.35
7.0.140.0030.10018.73
7.0.130.0030.07615.59
7.0.120.0070.08615.25
7.0.110.0030.07515.34
7.0.100.0060.07415.41
7.0.90.0100.09517.85
7.0.80.0070.09417.81
7.0.70.0110.09717.72
7.0.60.0100.09117.54
7.0.50.0080.09717.87
7.0.40.0100.09916.71
7.0.30.0080.09816.69
7.0.20.0070.09916.74
7.0.10.0050.07916.68
7.0.00.0120.09616.60
5.6.380.0030.16114.36
5.6.370.0100.14614.63
5.6.360.0070.15213.96
5.6.350.0070.14914.28
5.6.340.0030.16214.27
5.6.330.0070.15614.27
5.6.320.0030.14814.45
5.6.310.0030.14714.02
5.6.300.0070.14014.56
5.6.290.0030.14514.41
5.6.280.0030.19717.74
5.6.270.0030.14614.30
5.6.260.0100.15714.32
5.6.250.0030.15814.38
5.6.240.0080.14917.33
5.6.230.0100.16817.44
5.6.220.0080.17817.33
5.6.210.0100.16617.53
5.6.200.0030.17517.70
5.6.190.0100.17517.65
5.6.180.0030.18017.59
5.6.170.0120.18417.54
5.6.160.0080.17117.71
5.6.150.0130.16517.64
5.6.140.0080.16017.72
5.6.130.0050.16817.72
5.6.120.0030.17517.55
5.6.110.0030.14317.59
5.6.100.0070.16717.47
5.6.90.0080.17217.64
5.6.80.0020.17217.34
5.6.70.0050.16117.20
5.6.60.0070.16817.24
5.6.50.0050.17017.15
5.6.40.0070.17617.35
5.6.30.0080.17517.37
5.6.20.0100.16517.31
5.6.10.0050.13917.23
5.6.00.0100.15217.22
5.5.380.0020.16915.54
5.5.370.0130.16315.43
5.5.360.0070.16115.61
5.5.350.0070.17015.61
5.5.340.0200.13516.01
5.5.330.0070.16615.89
5.5.320.0080.15215.86
5.5.310.0030.17915.85
5.5.300.0070.14115.88
5.5.290.0030.17016.03
5.5.280.0080.16615.89
5.5.270.0020.16716.00
5.5.260.0050.18116.01
5.5.250.0050.16315.69
5.5.240.0070.17315.54
5.5.230.0100.15915.46
5.5.220.0120.16815.38
5.5.210.0020.14715.45
5.5.200.0100.16715.58
5.5.190.0100.17315.52
5.5.180.0080.15715.55
5.5.170.0030.15210.93
5.5.160.0080.17615.44
5.5.150.0050.15615.45
5.5.140.0080.15715.67
5.5.130.0050.17015.71
5.5.120.0050.14715.63
5.5.110.0020.16315.45
5.5.100.0050.17015.44
5.5.90.0030.17415.55
5.5.80.0030.16615.60
5.5.70.0100.17715.55
5.5.60.0080.15915.35
5.5.50.0130.15915.67
5.5.40.0100.15515.57
5.5.30.0080.15615.54
5.5.20.0030.14815.33
5.5.10.0080.15815.46
5.5.00.0070.17215.51
5.4.450.0120.16015.00
5.4.440.0050.16415.19
5.4.430.0100.16915.08
5.4.420.0050.17415.29
5.4.410.0070.17614.92
5.4.400.0120.14614.84
5.4.390.0050.14714.93
5.4.380.0030.14314.76
5.4.370.0030.14014.77
5.4.360.0050.16814.96
5.4.350.0070.17914.88
5.4.340.0030.17114.96
5.4.330.0000.15411.02
5.4.320.0050.15014.81
5.4.310.0050.16314.81
5.4.300.0000.16315.03
5.4.290.0030.15115.10
5.4.280.0050.16214.90
5.4.270.0120.17014.94
5.4.260.0030.16715.06
5.4.250.0180.13614.94
5.4.240.0170.15514.97
5.4.230.0050.16315.04
5.4.220.0000.18315.06
5.4.210.0100.14414.92
5.4.200.0070.15014.99
5.4.190.0080.16814.96
5.4.180.0050.15114.85
5.4.170.0070.15015.10
5.4.160.0050.17414.89
5.4.150.0030.15614.96
5.4.140.0050.17413.69
5.4.130.0030.17713.51
5.4.120.0070.16813.60
5.4.110.0020.16613.79
5.4.100.0050.18113.74
5.4.90.0130.18713.65
5.4.80.0070.15613.74
5.4.70.0070.16913.64
5.4.60.0050.17413.61
5.4.50.0100.16213.49
5.4.40.0070.16613.66
5.4.30.0030.17213.64
5.4.20.0030.18413.75
5.4.10.0070.16113.71
5.4.00.0020.17113.25
5.3.290.0050.16512.51
5.3.280.0050.13812.49
5.3.270.0100.16212.49
5.3.260.0080.15412.58
5.3.250.0050.16212.59
5.3.240.0030.13812.48
5.3.230.0070.13212.51
5.3.220.0050.17012.49
5.3.210.0030.17612.51
5.3.200.0080.16212.42
5.3.190.0070.14012.46
5.3.180.0070.15712.57
5.3.170.0050.15512.64
5.3.160.0100.14212.61
5.3.150.0020.16112.56
5.3.140.0080.15712.53
5.3.130.0030.17812.36
5.3.120.0080.15712.48
5.3.110.0070.16412.48
5.3.100.0020.16612.26
5.3.90.0030.16712.19
5.3.80.0050.17112.06
5.3.70.0050.16712.03
5.3.60.0030.16212.17
5.3.50.0050.16412.15
5.3.40.0070.16412.02
5.3.30.0050.16912.13
5.3.20.0070.15511.95
5.3.10.0050.17911.92
5.3.00.0050.16411.89
5.2.170.0030.17510.63
5.2.160.0050.16610.53
5.2.150.0070.15910.63
5.2.140.0000.16110.60
5.2.130.0070.16410.61
5.2.120.0000.17310.65
5.2.110.0030.17210.49
5.2.100.0020.14310.49
5.2.90.0070.15010.56
5.2.80.0020.17210.58
5.2.70.0030.16310.61
5.2.60.0050.15910.59
5.2.50.0050.16710.57
5.2.40.0030.15710.51
5.2.30.0030.16610.53
5.2.20.0050.16610.46
5.2.10.0080.15610.52
5.2.00.0030.15610.39
5.1.60.0020.0249.98
5.1.50.0020.0159.97
5.1.40.0010.0149.88
5.1.30.0060.01710.17
5.1.20.0030.01610.16
5.1.10.0020.02410.02
5.1.00.0030.02610.03
5.0.50.0030.0119.26
5.0.40.0040.0179.22
5.0.30.0000.0239.10
5.0.20.0030.0119.11
5.0.10.0000.0199.07
5.0.00.0020.0188.98
4.4.90.0020.0198.62
4.4.80.0020.0198.62
4.4.70.0010.0218.62
4.4.60.0000.0208.62
4.4.50.0000.0218.62
4.4.40.0020.0178.62
4.4.30.0030.0078.62
4.4.20.0010.0168.62
4.4.10.0020.0178.62
4.4.00.0020.0138.62
4.3.110.0000.0138.62
4.3.100.0000.0158.62
4.3.90.0030.0078.62
4.3.80.0020.0128.62
4.3.70.0050.0088.62
4.3.60.0030.0088.62
4.3.50.0010.0118.62
4.3.40.0050.0208.62
4.3.30.0000.0128.62
4.3.20.0010.0138.62
4.3.10.0020.0108.62
4.3.00.0020.0078.62

preferences:
54.16 ms | 401 KiB | 5 Q