3v4l.org

run code in 300+ PHP versions simultaneously
<?php [5.5][0]; class ob { private $b = false; public function __construct($b=false) { if ($b) $this->b = $b; } public function toString(){ return $b; } } class b {} $x = new b(); $ob = new ob(); $ob2 = new ob(true); if ($x) echo 'x/'; if ($ob) echo 'ob/'; if ($ob2) echo 'ob2/';

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.0070.01416.88
8.3.50.0110.00922.12
8.3.40.0150.00018.84
8.3.30.0070.00719.26
8.3.20.0040.00420.38
8.3.10.0050.00321.75
8.3.00.0080.00019.17
8.2.180.0100.01016.63
8.2.170.0070.01022.96
8.2.160.0070.01022.13
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00718.04
8.2.110.0040.00420.52
8.2.100.0120.00318.22
8.2.90.0050.00319.24
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0050.00318.05
8.2.50.0000.00918.07
8.2.40.0000.00718.31
8.2.30.0050.00219.40
8.2.20.0040.00417.79
8.2.10.0040.00417.95
8.2.00.0030.00517.65
8.1.280.0140.00725.92
8.1.270.0130.00618.91
8.1.260.0080.00326.35
8.1.250.0030.00628.09
8.1.240.0040.00423.88
8.1.230.0000.01119.05
8.1.220.0020.00517.74
8.1.210.0040.00418.77
8.1.200.0100.00017.23
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0040.00421.86
8.1.150.0040.00418.84
8.1.140.0040.00419.25
8.1.130.0050.00317.70
8.1.120.0000.00817.43
8.1.110.0000.00817.44
8.1.100.0000.00717.39
8.1.90.0040.00417.32
8.1.80.0070.00017.33
8.1.70.0040.00417.39
8.1.60.0030.00617.63
8.1.50.0070.00317.48
8.1.40.0030.00617.47
8.1.30.0030.00517.65
8.1.20.0000.00717.71
8.1.10.0040.00417.56
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.38
8.0.270.0030.00317.28
8.0.260.0000.00717.24
8.0.250.0030.00316.95
8.0.240.0070.00017.07
8.0.230.0030.00316.87
8.0.220.0030.00316.89
8.0.210.0030.00316.91
8.0.200.0000.00616.86
8.0.190.0030.00316.84
8.0.180.0070.00016.91
8.0.170.0070.00016.84
8.0.160.0050.00216.96
8.0.150.0000.00716.74
8.0.140.0000.00816.89
8.0.130.0050.00013.32
8.0.120.0040.00416.89
8.0.110.0040.00416.80
8.0.100.0030.00516.77
8.0.90.0000.00716.78
8.0.80.0120.00916.77
8.0.70.0000.00716.80
8.0.60.0040.00416.91
8.0.50.0070.00016.77
8.0.30.0180.00417.07
8.0.20.0090.01317.40
8.0.10.0040.00416.82
8.0.00.0120.01016.79
7.4.330.0030.00315.03
7.4.320.0030.00316.47
7.4.300.0030.00316.51
7.4.290.0040.00416.56
7.4.280.0040.00416.60
7.4.270.0040.00416.54
7.4.260.0060.00316.47
7.4.250.0060.00316.53
7.4.240.0020.00516.44
7.4.230.0040.00416.52
7.4.220.0070.01016.66
7.4.210.0100.00816.61
7.4.200.0030.00316.54
7.4.160.0090.00616.48
7.4.150.0110.00717.40
7.4.140.0170.00317.86
7.4.130.0120.00616.36
7.4.120.0120.00416.49
7.4.110.0090.00916.59
7.4.100.0130.01016.44
7.4.90.0150.00316.74
7.4.80.0090.00919.39
7.4.70.0080.00916.55
7.4.60.0070.01016.44
7.4.50.0040.00016.53
7.4.40.0060.01016.45
7.4.30.0100.01016.51
7.4.00.0030.00815.19
7.3.330.0000.00613.31
7.3.320.0000.00513.23
7.3.310.0070.00016.20
7.3.300.0070.00016.31
7.3.290.0030.00316.31
7.3.280.0080.01016.33
7.3.270.0130.00717.40
7.3.260.0120.00616.46
7.3.250.0130.00516.33
7.3.240.0130.00316.34
7.3.230.0090.01016.58
7.3.210.0140.00316.29
7.3.200.0070.01019.39
7.3.190.0110.01116.52
7.3.180.0030.01316.60
7.3.170.0080.00816.40
7.3.160.0090.00716.60
7.2.330.0120.01216.75
7.2.320.0130.00416.67
7.2.310.0060.01216.55
7.2.300.0060.01216.58
7.2.290.0070.01116.63
7.2.60.0070.00716.71
7.2.00.0000.01819.51
7.1.200.0070.00415.67
7.1.100.0000.00918.27
7.1.70.0000.00816.87
7.1.60.0070.01819.46
7.1.50.0120.00916.99
7.1.00.0000.08022.36
7.0.200.0340.00714.92
7.0.140.0030.06721.96
7.0.60.0070.03719.79
7.0.50.0070.06317.89
7.0.40.0130.09320.04
7.0.30.0500.05720.16
7.0.20.0270.05720.23
7.0.10.0070.06720.23
7.0.00.0030.06320.19
5.6.280.0030.07021.13
5.6.210.0000.09020.69
5.6.200.0130.07018.19
5.6.190.0030.06720.67
5.6.180.0230.08020.48
5.6.170.0230.06720.57
5.6.160.0170.07720.66
5.6.150.0070.07718.16
5.6.140.0170.07318.14
5.6.130.0100.06718.16
5.6.120.0070.06321.04
5.6.110.0100.08321.02
5.6.100.0130.07321.11
5.6.90.0100.06720.98
5.6.80.0100.06720.54
5.5.350.0400.05020.36
5.5.340.0070.08018.04
5.5.330.0170.07020.25
5.5.320.0430.07720.31
5.5.310.0300.04720.31
5.5.300.0030.05018.09
5.5.290.0030.05317.92
5.5.280.0130.07720.78
5.5.270.0030.08320.67
5.5.260.0030.08720.80
5.5.250.0030.07720.59
5.5.240.0100.07020.16
5.4.450.0430.06319.39
5.4.440.0770.06019.70
5.4.430.0970.06019.20
5.4.420.0070.06019.38
5.4.410.0730.06019.48
5.4.400.0530.05019.23
5.4.390.0170.06018.80
5.4.380.0330.05318.61
5.4.370.0270.05718.80
5.4.360.0270.06718.73
5.4.350.0270.05318.80
5.4.340.0230.05718.48
5.4.320.0230.05318.83
5.4.310.0300.06018.63
5.4.300.0270.05318.80
5.4.290.0300.05018.47
5.4.280.0300.05318.56
5.4.270.0170.05718.76
5.4.260.0200.05718.45
5.4.250.0300.05718.73
5.4.240.0230.06018.69
5.4.230.0270.05018.53
5.4.220.0230.05718.45
5.4.210.0200.05318.77
5.4.200.0200.05316.54
5.4.190.0270.05018.54
5.4.180.0270.04718.80
5.4.170.0270.04718.67
5.4.160.0300.04718.70
5.4.150.0130.05718.60
5.4.140.0230.05016.22
5.4.130.0230.05716.26
5.4.120.0270.03716.32
5.4.110.0230.04016.19
5.4.100.0200.05016.29
5.4.90.0300.05016.29
5.4.80.0200.05716.15
5.4.70.0200.05316.40
5.4.60.0130.05716.26
5.4.50.0230.04716.29
5.4.40.0270.04016.29
5.4.30.0170.05316.17
5.4.20.0300.04016.17
5.4.10.0200.04316.24
5.4.00.0170.05315.72
5.3.290.0270.04714.62
5.3.280.0170.05314.59
5.3.270.0200.05314.70
5.3.260.0300.04714.61
5.3.250.0200.05314.64
5.3.240.0200.05014.70
5.3.230.0400.04714.69
5.3.220.0170.05314.48
5.3.210.0130.05714.64
5.3.200.0300.04714.54
5.3.190.0200.05014.56
5.3.180.0270.04714.56
5.3.170.0170.05314.64
5.3.160.0230.04714.65
5.3.150.0200.05314.66
5.3.140.0170.05014.49
5.3.130.0200.05014.45
5.3.120.0200.05314.46
5.3.110.0070.06714.52
5.3.100.0100.05714.01
5.3.90.0170.05314.02
5.3.80.0200.05313.93
5.3.70.0370.03013.99
5.3.60.0130.06013.89
5.3.50.0100.06313.89
5.3.40.0200.06314.03
5.3.30.0230.05013.86
5.3.20.0230.04313.61
5.3.10.0230.05713.75
5.3.00.0230.04713.61
5.2.170.0170.04011.17
5.2.160.0200.04711.13
5.2.150.0170.04311.11
5.2.140.0030.05311.14
5.2.130.0170.04711.25
5.2.120.0300.04011.01
5.2.110.0200.04011.06
5.2.100.0130.05011.24
5.2.90.0130.04711.26
5.2.80.0100.04711.25
5.2.70.0070.05011.13
5.2.60.0170.04311.00
5.2.50.0170.04010.96
5.2.40.0200.03010.98
5.2.30.0170.04310.93
5.2.20.0070.04310.94
5.2.10.0100.04010.83
5.2.00.0070.04710.87
5.1.60.0100.03310.10
5.1.50.0130.03310.11
5.1.40.0100.0339.93
5.1.30.0100.03710.34
5.1.20.0070.04710.39
5.1.10.0170.03310.16
5.1.00.0270.03310.20
5.0.50.0070.0278.54
5.0.40.0070.0278.53
5.0.30.0070.0608.25
5.0.20.0200.0238.21
5.0.10.0000.0408.27
5.0.00.0100.0408.34
4.4.90.0030.0275.88
4.4.80.0070.0275.90
4.4.70.0000.0305.86
4.4.60.0100.0175.90
4.4.50.0000.0305.88
4.4.40.0100.0335.89
4.4.30.0100.0205.88
4.4.20.0030.0235.98
4.4.10.0000.0275.92
4.4.00.0030.0375.97
4.3.110.0000.0275.88
4.3.100.0030.0235.83
4.3.90.0070.0205.80
4.3.80.0100.0305.87
4.3.70.0070.0205.81
4.3.60.0030.0235.81
4.3.50.0030.0235.87
4.3.40.0100.0305.80
4.3.30.0100.0174.63
4.3.20.0000.0274.56
4.3.10.0000.0234.51
4.3.00.0170.0209.46

preferences:
59.82 ms | 401 KiB | 5 Q