3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { public function baz() { return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); } } $start = microtime(true); $foo = new Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . round((microtime(true) - $start ) / 1000000, 5) . 's'; }

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.0.110.0000.04417.00
8.0.100.0000.04416.98
8.0.90.0000.04516.86
8.0.80.0130.06017.00
8.0.70.0060.03816.91
8.0.60.0070.03816.90
8.0.50.0000.04416.82
8.0.30.0110.05116.95
8.0.20.0080.05617.40
8.0.10.0000.04417.03
8.0.00.0120.05216.75
7.4.240.0070.04016.52
7.4.230.0040.04316.75
7.4.220.0160.06416.67
7.4.210.0070.08116.59
7.4.200.0030.04416.64
7.4.160.0090.06616.52
7.4.150.0070.06017.40
7.4.140.0090.05917.86
7.4.130.0130.04816.56
7.4.120.0070.06316.52
7.4.110.0090.05316.69
7.4.100.0060.05816.58
7.4.90.0160.05116.74
7.4.80.0070.06619.39
7.4.70.0060.05716.52
7.4.60.0030.06416.36
7.4.50.0040.03216.40
7.4.40.0040.07216.74
7.4.30.0130.04916.59
7.4.00.0080.05514.85
7.3.300.0060.04116.21
7.3.290.0130.06916.37
7.3.280.0100.06416.31
7.3.270.0120.05417.40
7.3.260.0080.07616.37
7.3.250.0130.05916.48
7.3.240.0160.05316.40
7.3.230.0130.05316.39
7.3.210.0160.05616.56
7.3.200.0130.07019.39
7.3.190.0130.07716.72
7.3.180.0100.05916.54
7.3.170.0130.07016.59
7.3.160.0130.08216.65
7.3.120.0050.05514.80
7.3.110.0070.07114.75
7.3.100.0000.05214.63
7.3.90.0030.07014.76
7.3.80.0000.05114.77
7.3.70.0030.07114.82
7.3.60.0030.05314.54
7.3.50.0100.04314.66
7.3.40.0030.04814.92
7.3.30.0100.06514.88
7.3.20.0030.05116.43
7.3.10.0100.04816.56
7.3.00.0050.05416.47
7.2.330.0060.06716.62
7.2.320.0150.07716.51
7.2.310.0090.06016.51
7.2.300.0130.05816.71
7.2.290.0070.06716.52
7.2.250.0070.07815.09
7.2.240.0070.05115.19
7.2.230.0030.08215.29
7.2.220.0030.08214.93
7.2.210.0000.05415.00
7.2.200.0030.06115.14
7.2.190.0070.05014.83
7.2.180.0070.05515.11
7.2.170.0060.04815.13
7.2.130.0030.05516.81
7.2.120.0060.05816.75
7.2.110.0080.05916.74
7.2.100.0120.05216.95
7.2.90.0020.05716.84
7.2.80.0080.06316.74
7.2.70.0140.05516.75
7.2.60.0090.05216.78
7.2.50.0080.06016.79
7.2.40.0110.05516.99
7.2.30.0130.04916.80
7.2.20.0100.05416.87
7.2.10.0050.06316.68
7.2.00.0080.05016.98
7.1.330.0000.12915.94
7.1.320.0000.13015.71
7.1.310.0070.12515.41
7.1.300.0030.11515.71
7.1.290.0100.13415.45
7.1.280.0070.14015.77
7.1.270.0030.13915.80
7.1.260.0000.12515.71
7.1.250.0110.13415.57
7.1.200.0030.05715.51
7.1.70.0060.04517.08
7.1.60.0100.09519.70
7.1.50.0030.05717.07
7.1.00.0100.13322.28
7.0.200.0000.05216.49
7.0.140.0030.18321.95
7.0.70.0130.12721.73
7.0.60.0000.13721.89
7.0.50.0030.15322.09
7.0.40.0070.13320.02
7.0.30.0000.14020.05
7.0.20.0030.12720.10
7.0.10.0130.12320.02
7.0.00.0130.12320.14
5.6.220.0100.24020.50
5.6.210.0170.22720.47
5.6.200.0000.19721.09
5.6.190.0030.23321.08
5.6.180.0100.22321.05
5.6.170.0000.19721.17
5.6.160.0070.21721.02
5.6.150.0030.18320.95
5.6.140.0030.26021.08
5.6.130.0030.19320.93
5.6.120.0030.23021.02
5.6.110.0030.18720.96
5.6.100.0070.19021.12
5.6.90.0070.26721.04
5.6.80.0130.21320.42
5.6.70.0130.25720.45
5.6.60.0030.22720.43
5.6.50.0030.25320.42
5.6.40.0070.19020.46
5.6.30.0000.23020.46
5.6.20.0000.21720.46
5.6.10.0000.21720.43
5.6.00.0030.20720.35
5.5.360.0070.22720.53
5.5.350.0100.23720.34
5.5.340.0030.26020.84
5.5.330.0070.26020.89
5.5.320.0030.20020.80
5.5.310.0030.21020.84
5.5.300.0030.18720.88
5.5.290.0070.26020.92
5.5.280.0030.26020.87
5.5.270.0000.23320.84
5.5.260.0070.25720.61
5.5.250.0030.19020.70
5.5.240.0030.24320.16
5.5.230.0000.25320.27
5.5.220.0000.26320.27
5.5.210.0070.25720.15
5.5.200.0070.19320.16
5.5.190.0070.20320.15
5.5.180.0000.27020.28
5.5.160.0000.18320.12
5.5.150.0030.24019.97
5.5.140.0030.18019.98
5.5.130.0000.19720.16
5.5.120.0030.19320.12
5.5.110.0270.22320.08
5.5.100.0030.20320.10
5.5.90.0000.19720.15
5.5.80.0030.21720.16
5.5.70.0000.22019.94
5.5.60.0000.22020.12
5.5.50.0000.20020.09
5.5.40.0030.21720.15
5.5.30.0000.23720.09
5.5.20.0100.23320.03
5.5.10.0070.24320.04
5.5.00.0070.24320.12
5.4.450.0030.25319.40
5.4.440.0030.25019.62
5.4.430.0070.23019.55
5.4.420.0000.26319.44
5.4.410.0030.25319.15
5.4.400.0130.25019.30
5.4.390.0070.23319.18
5.4.380.0030.26718.96
5.4.370.0030.23018.96
5.4.360.0070.18718.96
5.4.350.0000.25719.10
5.4.340.0030.20718.96
5.4.320.0030.22719.02
5.4.310.0070.23319.00
5.4.300.0030.24719.09
5.4.290.0070.18018.93
5.4.280.0030.20719.02
5.4.270.0030.20719.09
5.4.260.0000.25718.93
5.4.250.0070.21319.09
5.4.240.0030.24019.28
5.4.230.0000.21719.20
5.4.220.0030.20718.90
5.4.210.0030.25319.18
5.4.200.0000.21319.22
5.4.190.0100.21019.11
5.4.180.0100.24719.03
5.4.170.0070.26018.90
5.4.160.0030.26318.94
5.4.150.0070.21719.07
5.4.140.0000.22716.44
5.4.130.0030.22716.31
5.4.120.0030.22016.25
5.4.110.0030.23716.45
5.4.100.0030.25016.41
5.4.90.0070.23016.39
5.4.80.0000.18316.25
5.4.70.0030.25016.49
5.4.60.0130.21716.48
5.4.50.0000.23016.30
5.4.40.0000.23716.51
5.4.30.0070.23316.46
5.4.20.0000.24016.45
5.4.10.0070.20016.53
5.4.00.0000.23315.96
5.3.290.0230.42014.81
5.3.280.0030.35714.73
5.3.270.0070.37314.75
5.3.260.0000.41314.71
5.3.250.0000.35714.63
5.3.240.0030.36014.61
5.3.230.0030.34714.70
5.3.220.0070.42714.68
5.3.210.0000.38014.55
5.3.200.0030.43014.68
5.3.190.0000.38314.59
5.3.180.0070.36014.70
5.3.170.0030.32714.68
5.3.160.0030.35714.68
5.3.150.0000.37314.61
5.3.140.0000.43014.68
5.3.130.0000.42014.65
5.3.120.0030.35314.56
5.3.110.0030.37714.58
5.3.100.0030.36014.14
5.3.90.0070.42714.12
5.3.80.0030.40013.98
5.3.70.0030.42314.13
5.3.60.0030.42013.90
5.3.50.0070.38013.95
5.3.40.0130.40713.87
5.3.30.0000.37713.98
5.3.20.0000.37313.74
5.3.10.0000.40713.55
5.3.00.0030.43713.70
5.2.170.0030.04712.32
5.2.160.0030.06012.32
5.2.150.0070.05712.32
5.2.140.0000.06312.32
5.2.130.0000.03712.32
5.2.120.0030.06012.32
5.2.110.0000.05312.32
5.2.100.0000.04712.32
5.2.90.0000.06712.32
5.2.80.0030.05712.32
5.2.70.0030.04712.32
5.2.60.0030.05012.32
5.2.50.0030.05712.32
5.2.40.0070.05312.32
5.2.30.0000.04312.32
5.2.20.0100.05712.32
5.2.10.0000.04712.32
5.2.00.0070.06312.32
5.1.60.0000.05712.32
5.1.50.0000.04012.32
5.1.40.0030.02312.32
5.1.30.0070.05712.32
5.1.20.0000.06012.32
5.1.10.0030.05712.32
5.1.00.0030.04312.32
5.0.50.0000.04312.32
5.0.40.0070.03712.32
5.0.30.0030.06712.32
5.0.20.0000.03712.32
5.0.10.0000.05012.32
5.0.00.0000.05012.32
4.4.90.0000.04012.32
4.4.80.0030.03312.32
4.4.70.0000.03012.32
4.4.60.0000.03712.32
4.4.50.0000.03712.32
4.4.40.0100.04712.32
4.4.30.0030.02712.32
4.4.20.0000.02712.32
4.4.10.0100.01312.32
4.4.00.0030.05012.32
4.3.110.0030.03312.32
4.3.100.0000.02712.32
4.3.90.0000.03312.32
4.3.80.0000.02712.32
4.3.70.0000.01312.32
4.3.60.0000.03712.32
4.3.50.0000.02712.32
4.3.40.0030.05012.32
4.3.30.0030.03712.32
4.3.20.0030.03312.32
4.3.10.0000.04012.32
4.3.00.0030.03312.32

preferences:
33.95 ms | 400 KiB | 5 Q