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: " . (microtime(true) - $start ) . 'us'; }

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.0060.02616.82
8.0.100.0030.02917.02
8.0.90.0040.02916.71
8.0.80.0060.03516.86
8.0.70.0070.02716.87
8.0.60.0000.03316.89
8.0.50.0030.02916.71
8.0.30.0130.03116.96
8.0.20.0110.03417.40
8.0.10.0060.02616.98
8.0.00.0110.03916.56
7.4.240.0050.03016.54
7.4.230.0000.03416.58
7.4.220.0090.04816.52
7.4.210.0080.03816.51
7.4.200.0030.03216.51
7.4.190.0060.02816.75
7.4.160.0110.03716.38
7.4.150.0160.03517.40
7.4.140.0060.04117.86
7.4.130.0130.03516.53
7.4.120.0130.04416.45
7.4.110.0090.04016.54
7.4.100.0130.03516.36
7.4.90.0060.05716.47
7.4.80.0130.03719.39
7.4.70.0030.04416.57
7.4.60.0030.05316.47
7.4.50.0000.04416.53
7.4.40.0130.03022.77
7.4.30.0030.04716.52
7.4.00.0030.03814.90
7.3.300.0000.03416.21
7.3.290.0070.03816.34
7.3.280.0050.04716.31
7.3.270.0150.03417.40
7.3.260.0100.03916.35
7.3.250.0140.04416.39
7.3.240.0030.06616.63
7.3.230.0060.04416.52
7.3.210.0160.03916.43
7.3.200.0060.04419.39
7.3.190.0120.04016.59
7.3.180.0180.03216.61
7.3.170.0100.06016.43
7.3.160.0030.04716.38
7.3.120.0000.03815.04
7.3.10.0000.03916.53
7.3.00.0030.03216.75
7.2.330.0100.06216.66
7.2.320.0030.07616.61
7.2.310.0130.06016.58
7.2.300.0100.04316.84
7.2.290.0130.04316.45
7.2.130.0030.04116.80
7.2.120.0030.04216.90
7.2.110.0100.04016.99
7.2.100.0030.03517.04
7.2.90.0000.04117.07
7.2.80.0000.04117.11
7.2.70.0000.04316.98
7.2.60.0030.03516.80
7.2.50.0100.03717.01
7.2.40.0060.03516.97
7.2.30.0070.03016.75
7.2.20.0070.04017.00
7.2.10.0090.03816.95
7.2.00.0070.03518.11
7.1.250.0070.07915.64
7.1.200.0070.03415.75
7.1.100.0070.03917.77
7.1.70.0000.04017.17
7.1.60.0130.07219.32
7.1.50.0100.06716.99
7.1.00.0030.05722.30
7.0.200.0040.02916.73
7.0.140.0100.10722.04
7.0.100.0230.07020.04
7.0.90.0370.11720.01
7.0.80.0170.11020.02
7.0.70.0000.11719.88
7.0.60.0230.10719.86
7.0.50.0070.12320.28
7.0.40.0100.07320.08
7.0.30.0070.11720.08
7.0.20.0030.11319.96
7.0.10.0130.12320.07
7.0.00.0070.12320.11
5.6.280.0070.28020.89
5.6.250.0200.20320.62
5.6.240.0070.23020.55
5.6.230.0100.20320.49
5.6.220.0130.23720.71
5.6.210.0070.23020.75
5.6.200.0130.24021.14
5.6.190.0070.23321.10
5.6.180.0130.23021.05
5.6.170.0100.21721.08
5.6.160.0070.23321.13
5.6.150.0070.21321.04
5.6.140.0030.21021.08
5.6.130.0200.22321.05
5.6.120.0130.23321.17
5.6.110.0100.23321.04
5.6.100.0170.21320.95
5.6.90.0070.25721.09
5.6.80.0100.22320.40
5.6.70.0130.29720.51
5.6.60.0100.23020.54
5.6.50.0200.20720.42
5.6.40.0070.21020.31
5.6.30.0070.24020.41
5.6.20.0100.19020.39
5.6.10.0170.22020.42
5.6.00.0030.20320.43
5.5.380.0170.26020.35
5.5.370.0200.24320.34
5.5.360.0130.21020.34
5.5.350.0200.22320.45
5.5.340.0030.23720.82
5.5.330.0130.24320.88
5.5.320.0070.25020.83
5.5.310.0130.23320.93
5.5.300.0070.23320.93
5.5.290.0070.23020.87
5.5.280.0170.24020.76
5.5.270.0070.25720.64
5.5.260.0100.20720.88
5.5.250.0070.24020.71
5.5.240.0170.26320.28
5.5.230.0100.21320.27
5.5.220.0130.23720.11
5.5.210.0070.23320.11
5.5.200.0030.24320.19
5.5.190.0100.21320.11
5.5.180.0030.20720.28
5.5.160.0130.23320.15
5.5.150.0130.22020.17
5.5.140.0200.19020.24
5.5.130.0100.22020.26
5.5.120.0030.24720.11
5.5.110.0070.21020.16
5.5.100.0030.22720.15
5.5.90.0070.23320.10
5.5.80.0100.24019.95
5.5.70.0000.20720.09
5.5.60.0170.24320.05
5.5.50.0030.22320.15
5.5.40.0070.21720.00
5.5.30.0070.23720.07
5.5.20.0130.22720.04
5.5.10.0100.23320.04
5.5.00.0070.24720.00
5.4.450.0130.19719.48
5.4.440.0000.27719.48
5.4.430.0200.23319.46
5.4.420.0230.20719.20
5.4.410.0000.22719.43
5.4.400.0070.23719.21
5.4.390.0030.18318.90
5.4.380.0030.24319.13
5.4.370.0070.22019.16
5.4.360.0130.21719.16
5.4.350.0030.21319.04
5.4.340.0030.23718.91
5.4.320.0130.23719.14
5.4.310.0170.20719.14
5.4.300.0130.20018.87
5.4.290.0100.24319.04
5.4.280.0070.24719.04
5.4.270.0070.22318.86
5.4.260.0000.22719.02
5.4.250.0200.19019.12
5.4.240.0130.24318.84
5.4.230.0000.19319.14
5.4.220.0100.18719.11
5.4.210.0170.22018.89
5.4.200.0100.19019.04
5.4.190.0000.18319.11
5.4.180.0130.23018.94
5.4.170.0100.21318.89
5.4.160.0070.17719.10
5.4.150.0070.17719.01
5.4.140.0030.16716.42
5.4.130.0070.16316.40
5.4.120.0100.14716.41
5.4.110.0030.17716.32
5.4.100.0000.15016.51
5.4.90.0030.17316.46
5.4.80.0070.14716.38
5.4.70.0070.16716.48
5.4.60.0070.20716.37
5.4.50.0070.22716.45
5.4.40.0070.26316.30
5.4.30.0070.19716.39
5.4.20.0330.14316.40
5.4.10.0070.19716.39
5.4.00.0070.24015.77
5.3.290.0170.33714.67
5.3.280.0030.34714.61
5.3.270.0100.38314.62
5.3.260.0070.30314.74
5.3.250.0000.29714.74
5.3.240.0030.27314.53
5.3.230.0030.29014.52
5.3.220.0030.25714.57
5.3.210.0000.29714.59
5.3.200.0030.24314.49
5.3.190.0500.24014.51
5.3.180.0030.28714.68
5.3.170.0030.27314.54
5.3.160.0070.30314.54
5.3.150.0130.31014.59
5.3.140.0000.34014.60
5.3.130.0130.36014.64
5.3.120.0170.36314.51
5.3.110.0070.33314.52
5.3.100.0030.31014.17
5.3.90.0070.31314.08
5.3.80.0000.29314.08
5.3.70.0070.34314.08
5.3.60.0030.30014.10
5.3.50.0070.34014.00
5.3.40.0170.31713.92
5.3.30.0030.32013.88
5.3.20.0070.28713.69
5.3.10.0000.32013.55
5.3.00.0000.29013.74
5.2.170.0030.03012.31
5.2.160.0030.05712.31
5.2.150.0000.06712.31
5.2.140.0130.04312.31
5.2.130.0000.03012.31
5.2.120.0030.03312.31
5.2.110.0000.03312.31
5.2.100.0030.02312.31
5.2.90.0070.03712.31
5.2.80.0030.03012.31
5.2.70.0000.03012.31
5.2.60.0030.02712.31
5.2.50.0030.02312.31
5.2.40.0000.02312.31
5.2.30.0030.05712.31
5.2.20.0070.01712.31
5.2.10.0000.02712.31
5.2.00.0130.05312.31
5.1.60.0000.03712.31
5.1.50.0030.03012.31
5.1.40.0000.02712.31
5.1.30.0100.02012.31
5.1.20.0070.02312.31
5.1.10.0000.02312.31
5.1.00.0070.02012.31
5.0.50.0000.02012.31
5.0.40.0000.02312.31
5.0.30.0000.03712.31
5.0.20.0000.01712.31
5.0.10.0000.02012.31
5.0.00.0070.02712.31
4.4.90.0030.01312.31
4.4.80.0070.01312.31
4.4.70.0000.01312.31
4.4.60.0000.01312.31
4.4.50.0000.01712.31
4.4.40.0000.02712.31
4.4.30.0000.01312.31
4.4.20.0030.01012.31
4.4.10.0000.01312.31
4.4.00.0030.02012.31
4.3.110.0030.01012.31
4.3.100.0000.01312.31
4.3.90.0000.01712.31
4.3.80.0000.02012.31
4.3.70.0000.01312.31
4.3.60.0000.01312.31
4.3.50.0000.01312.31
4.3.40.0030.01712.31
4.3.30.0000.01312.31
4.3.20.0000.01312.31
4.3.10.0030.01012.31
4.3.00.0030.01012.31

preferences:
31.18 ms | 401 KiB | 5 Q