3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); interface ValidatorInterface { public function validate($number); } interface LegacyValidatorInterface { public function validate($number, $deprecated = false); } class Validator implements LegacyValidatorInterface, ValidatorInterface { public function validate($number, $deprecated = false) { echo func_num_args(); echo "\n"; } } class Decorator implements LegacyValidatorInterface { /** * @var LegacyValidatorInterface */ private $core; /** * @param LegacyValidatorInterface $core */ public function __construct(LegacyValidatorInterface $core) { $this->core = $core; } public function validate($number, $deprecated = false) { $this->core->validate($number, $deprecated); } } $v = new Decorator(new Validator()); $v->validate("1", false); $v->validate("1");

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.00718.55
8.3.50.0120.00316.63
8.3.40.0110.00418.72
8.3.30.0030.01218.84
8.3.20.0000.00820.86
8.3.10.0040.00421.73
8.3.00.0050.00320.77
8.2.180.0040.01618.41
8.2.170.0070.00722.96
8.2.160.0100.00322.09
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0070.00022.09
8.2.120.0070.00026.35
8.2.110.0030.00620.27
8.2.100.0060.00617.70
8.2.90.0030.00619.25
8.2.80.0050.00318.04
8.2.70.0060.00317.63
8.2.60.0040.00418.05
8.2.50.0040.00418.10
8.2.40.0080.00022.23
8.2.30.0040.00421.09
8.2.20.0000.00818.11
8.2.10.0000.00817.97
8.2.00.0000.00718.14
8.1.280.0070.01325.92
8.1.270.0040.00423.82
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.68
8.1.230.0070.00418.94
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0090.00017.48
8.1.190.0070.00317.35
8.1.180.0030.00618.10
8.1.170.0040.00418.64
8.1.160.0040.00419.04
8.1.150.0000.00720.72
8.1.140.0070.00319.63
8.1.130.0030.00318.96
8.1.120.0000.00717.37
8.1.110.0060.00317.50
8.1.100.0050.00217.40
8.1.90.0000.00817.40
8.1.80.0040.00417.36
8.1.70.0040.00417.51
8.1.60.0040.00417.59
8.1.50.0040.00417.56
8.1.40.0030.00517.57
8.1.30.0030.00517.67
8.1.20.0050.00217.58
8.1.10.0050.00317.54
8.1.00.0000.00717.45
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0070.00018.35
8.0.270.0040.00417.36
8.0.260.0030.00316.88
8.0.250.0000.00617.07
8.0.240.0020.00517.06
8.0.230.0000.00717.02
8.0.220.0000.00717.01
8.0.210.0000.00717.01
8.0.200.0000.00617.05
8.0.190.0050.00317.11
8.0.180.0080.00317.04
8.0.170.0070.00017.01
8.0.160.0070.00416.92
8.0.150.0000.00816.94
8.0.140.0040.00416.97
8.0.130.0050.00013.34
8.0.120.0040.00416.85
8.0.110.0040.00416.77
8.0.100.0000.00716.98
8.0.90.0030.00516.96
8.0.80.0150.00316.93
8.0.70.0000.00717.05
8.0.60.0000.00816.86
8.0.50.0040.00416.78
8.0.30.0080.01217.19
8.0.20.0130.00617.40
8.0.10.0050.00216.92
8.0.00.0100.00716.85
7.4.330.0030.00315.55
7.4.320.0000.00616.46
7.4.300.0060.00016.62
7.4.290.0030.00316.54
7.4.280.0000.00816.53
7.4.270.0030.00316.53
7.4.260.0060.00013.34
7.4.250.0030.00316.60
7.4.240.0000.00816.56
7.4.230.0050.00216.66
7.4.220.0090.00916.67
7.4.210.0120.00316.64
7.4.200.0030.00316.70
7.4.160.0050.01116.45
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0190.00616.48
7.4.120.0070.01116.55
7.4.110.0100.01016.64
7.4.100.0100.01116.46
7.4.90.0080.00816.59
7.4.80.0130.01019.39
7.4.70.0100.00716.39
7.4.60.0100.00716.57
7.4.50.0130.00316.59
7.4.40.0100.00716.63
7.4.30.0090.00916.53
7.4.10.0030.00915.14
7.4.00.0070.01015.05
7.3.330.0060.00013.26
7.3.320.0030.00313.11
7.3.310.0070.00016.34
7.3.300.0030.00316.30
7.3.290.0030.01016.25
7.3.280.0060.01116.24
7.3.270.0060.01217.40
7.3.260.0050.01216.41
7.3.250.0120.01116.48
7.3.240.0100.00716.34
7.3.230.0160.00516.23
7.3.210.0100.00616.41
7.3.200.0070.01016.32
7.3.190.0060.00916.46
7.3.180.0060.01016.51
7.3.170.0060.00916.27
7.3.160.0070.01416.56
7.3.130.0070.01114.95
7.3.120.0090.00914.63
7.3.110.0070.01314.96
7.3.100.0090.00614.76
7.3.90.0090.00614.79
7.3.80.0030.01214.84
7.3.70.0000.01814.64
7.3.60.0060.00914.87
7.3.50.0040.01214.84
7.3.40.0040.00714.61
7.3.30.0040.00714.68
7.3.20.0060.00616.55
7.3.10.0040.00816.19
7.3.00.0040.00816.53
7.2.330.0030.01416.40
7.2.320.0180.00016.65
7.2.310.0070.01016.84
7.2.300.0100.00716.72
7.2.290.0090.00916.83
7.2.260.0040.01115.16
7.2.250.0060.00915.08
7.2.240.0060.00915.13
7.2.230.0000.01815.17
7.2.220.0160.00015.02
7.2.210.0160.00015.20
7.2.200.0000.01215.08
7.2.190.0120.00615.14
7.2.180.0000.01615.27
7.2.170.0000.01814.82
7.2.160.0110.00315.19
7.2.150.0040.01116.91
7.2.140.0030.01016.88
7.2.130.0020.00716.86
7.2.120.0120.00516.88
7.2.110.0040.00616.78
7.2.100.0050.00816.65
7.2.90.0030.00716.68
7.2.80.0040.00816.88
7.2.70.0090.00816.90
7.2.60.0070.00916.93
7.2.50.0090.00616.79
7.2.40.0070.00916.75
7.2.30.0080.00716.62
7.2.20.0050.01017.08
7.2.10.0110.00716.52
7.2.00.0070.00617.64
7.1.330.0070.00715.82
7.1.320.0030.01015.68
7.1.310.0000.01715.86
7.1.300.0070.00715.78
7.1.290.0070.01015.71
7.1.280.0080.00815.79
7.1.270.0060.00915.77
7.1.260.0110.00316.02
7.1.250.0070.00715.51
7.1.240.0110.00015.73
7.1.230.0040.00415.80
7.1.220.0070.01015.86
7.1.210.0040.00815.83
7.1.200.0060.00715.79
7.1.190.0110.00715.78
7.1.180.0060.00915.85
7.1.170.0060.00915.73
7.1.160.0070.00715.79
7.1.150.0070.01015.79
7.1.140.0000.01316.02
7.1.130.0050.00815.71
7.1.120.0030.01116.02
7.1.110.0030.00815.57
7.1.100.0080.00416.77
7.1.90.0060.00615.87
7.1.80.0000.01115.86
7.1.70.0030.00716.27
7.1.60.0550.00724.44
7.1.50.0080.01125.33
7.1.40.0120.01025.17
7.1.30.0630.00724.14
7.1.20.0520.01224.25
7.1.10.0470.00715.37
7.1.00.0030.00616.20
7.0.330.0050.00515.43
7.0.320.0030.01015.30
7.0.310.0110.00015.37
7.0.300.0030.00915.29
7.0.290.0070.00715.00
7.0.280.0000.01415.50
7.0.270.0100.00315.22
7.0.260.0050.00515.63
7.0.250.0060.00615.45
7.0.240.0000.01515.49
7.0.230.0000.01415.46
7.0.220.0000.00815.27
7.0.210.0000.01515.39
7.0.200.0020.01016.20
7.0.190.0060.00816.09
7.0.180.0040.01115.91
7.0.170.0530.00915.90
7.0.160.0080.00515.86
7.0.150.0490.00414.94
7.0.140.0650.00715.20
7.0.130.0570.00915.25
7.0.120.0050.00615.72
7.0.110.0500.00714.91
7.0.100.0770.00615.97
7.0.90.0650.01014.91
7.0.80.0070.00515.90
7.0.70.0050.00514.93
7.0.60.0470.00914.93
7.0.50.0030.01015.72
7.0.40.0020.00914.97
7.0.30.0810.00914.04
7.0.20.0500.01014.13
7.0.10.0190.00614.10
7.0.00.0100.00914.01
5.6.400.0070.00714.70
5.6.390.0040.00714.40
5.6.380.0030.01214.60
5.6.370.0100.00514.32
5.6.360.0100.00314.44
5.6.350.0070.00414.39
5.6.340.0000.01214.73
5.6.330.0060.00614.45
5.6.320.0030.00714.38
5.6.310.0090.00614.63
5.6.300.0000.01014.09
5.6.290.0000.01414.53
5.6.280.0090.00314.52
5.6.270.0060.00614.48
5.6.260.0030.00614.50
5.6.250.0060.00914.24
5.6.240.0000.00814.16
5.6.230.0040.00714.52
5.6.220.0080.00414.25
5.6.210.0040.00714.41
5.6.200.0150.01214.17
5.6.190.0150.01214.27
5.6.180.0070.01814.34
5.6.170.0150.01214.57
5.6.160.0160.00914.23
5.6.150.0110.01514.13
5.6.140.0150.00914.25
5.6.130.0140.01114.46
5.6.120.0170.01014.21
5.6.110.0140.00714.49
5.6.100.0190.00614.29
5.6.90.0050.01614.39
5.6.80.0080.00614.18
5.6.70.0070.01014.44
5.6.60.0030.01514.38
5.6.50.0110.00414.28
5.6.40.0110.00314.02
5.6.30.0060.00914.56
5.6.20.0120.00314.20
5.6.10.0120.00314.22
5.6.00.0030.00614.31

preferences:
45.75 ms | 400 KiB | 5 Q