3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const MYARRAY = ['foo' => 'bar']; protected static $props = ['Hello' => 'Foo Value']; function getPropValue($propName) { return static::$props[$propName]; } function myFunc() { return 'hey myFunc'; } function yourFunc() { return 'hey yourFunc'; } } class Bar extends Foo { protected static $props = ['Hello' => 'Bar Value']; } $foo = new Foo(); echo $foo->getPropValue('Hello') . "\n\n"; $functionArray = ['myFunc' => 'myFunc']; echo $foo->$functionArray['myFunc']() . "\n\n"; $bar = new Bar(); echo $bar->getPropValue('Hello') . "\n\n"; if (isset(Foo::MYARRAY['foo'])) { echo 'foo is set' . "\n\n"; } else { echo 'foo is not set' . "\n\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)
8.3.60.0040.01116.74
8.3.50.0130.00316.34
8.3.40.0100.00518.82
8.3.30.0160.00318.84
8.3.20.0030.00520.20
8.3.10.0040.00421.91
8.3.00.0040.00417.63
8.2.180.0140.00016.88
8.2.170.0070.00722.96
8.2.160.0090.00620.48
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00722.11
8.2.120.0050.00326.35
8.2.110.0030.00722.12
8.2.100.0060.00618.22
8.2.90.0060.00319.17
8.2.80.0080.00017.97
8.2.70.0040.00417.38
8.2.60.0080.00018.03
8.2.50.0030.00618.10
8.2.40.0040.00420.51
8.2.30.0000.00821.15
8.2.20.0000.00718.06
8.2.10.0000.00718.11
8.2.00.0030.00618.21
8.1.280.0110.00425.92
8.1.270.0080.00023.96
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0170.00022.05
8.1.230.0000.01217.52
8.1.220.0050.00217.74
8.1.210.0040.00418.77
8.1.200.0070.00317.38
8.1.190.0060.00617.35
8.1.180.0000.00718.10
8.1.170.0050.00318.65
8.1.160.0030.00519.00
8.1.150.0040.00420.73
8.1.140.0000.00719.49
8.1.130.0070.00018.81
8.1.120.0040.00417.44
8.1.110.0050.00317.34
8.1.100.0000.00917.46
8.1.90.0080.00017.45
8.1.80.0050.00217.36
8.1.70.0000.00817.48
8.1.60.0040.00417.55
8.1.50.0040.00417.55
8.1.40.0040.00417.42
8.1.30.0000.00817.64
8.1.20.0090.00017.54
8.1.10.0040.00417.49
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0000.00718.50
8.0.270.0000.00717.20
8.0.260.0000.00716.79
8.0.250.0070.00017.01
8.0.240.0060.00316.91
8.0.230.0040.00317.00
8.0.220.0030.00316.94
8.0.210.0040.00416.96
8.0.200.0000.00617.02
8.0.190.0000.00816.90
8.0.180.0070.00016.87
8.0.170.0040.00417.02
8.0.160.0050.00316.98
8.0.150.0030.00316.89
8.0.140.0070.00016.91
8.0.130.0050.00013.38
8.0.120.0000.00816.79
8.0.110.0000.00716.84
8.0.100.0000.00716.90
8.0.90.0040.00417.00
8.0.80.0070.01016.90
8.0.70.0040.00416.84
8.0.60.0000.00716.84
8.0.50.0070.00016.82
8.0.30.0120.00716.98
8.0.20.0130.00817.40
8.0.10.0000.00816.98
8.0.00.0120.00616.77
7.4.330.0030.00315.55
7.4.320.0000.00716.46
7.4.300.0060.00016.62
7.4.290.0000.00816.59
7.4.280.0040.00416.64
7.4.270.0000.00716.53
7.4.260.0050.00313.18
7.4.250.0020.00516.56
7.4.240.0030.00316.50
7.4.230.0070.00016.62
7.4.220.0120.01516.41
7.4.210.0100.01016.68
7.4.200.0000.00716.72
7.4.160.0110.00816.50
7.4.150.0090.01017.40
7.4.140.0080.00917.86
7.4.130.0070.01416.55
7.4.120.0140.00716.55
7.4.110.0030.01316.48
7.4.100.0120.00616.35
7.4.90.0110.00616.51
7.4.80.0100.01319.39
7.4.70.0070.01016.51
7.4.60.0080.00816.62
7.4.50.0080.00816.38
7.4.40.0130.01016.62
7.4.30.0090.01216.54
7.4.00.0080.00714.78
7.3.330.0050.00013.27
7.3.320.0000.00513.25
7.3.310.0030.00316.39
7.3.300.0030.00316.39
7.3.290.0090.00816.46
7.3.280.0100.00916.44
7.3.270.0100.00717.40
7.3.260.0120.00716.48
7.3.250.0140.00716.57
7.3.240.0090.01116.43
7.3.230.0170.00316.54
7.3.210.0100.00616.57
7.3.200.0070.01116.68
7.3.190.0070.01416.31
7.3.180.0060.01016.47
7.3.170.0060.01216.63
7.3.160.0100.00616.49
7.3.120.0110.00814.83
7.3.110.0090.00914.87
7.3.100.0060.00914.91
7.3.90.0040.00814.87
7.3.80.0100.00514.67
7.3.70.0040.00914.90
7.3.60.0050.00814.95
7.3.50.0030.01214.65
7.3.40.0060.00914.69
7.3.30.0030.00914.95
7.3.20.0060.00816.78
7.3.10.0030.01016.60
7.3.00.0070.00916.56
7.2.330.0090.00916.75
7.2.320.0120.00616.79
7.2.310.0100.00716.65
7.2.300.0040.01516.95
7.2.290.0100.00716.78
7.2.250.0100.01014.91
7.2.240.0060.01215.20
7.2.230.0070.00915.25
7.2.220.0080.00515.01
7.2.210.0060.01115.26
7.2.200.0020.01015.06
7.2.190.0070.00915.02
7.2.180.0060.00914.86
7.2.170.0060.00714.89
7.2.160.0000.01215.11
7.2.150.0110.00716.89
7.2.140.0090.00616.84
7.2.130.0080.00717.00
7.2.120.0030.01416.72
7.2.110.0150.00016.79
7.2.100.0070.00716.95
7.2.90.0060.00317.10
7.2.80.0030.00917.03
7.2.70.0060.00616.59
7.2.60.0070.01017.07
7.2.50.0060.00916.66
7.2.40.0060.01016.90
7.2.30.0090.00017.01
7.2.20.0070.00416.67
7.2.10.0040.01116.79
7.2.00.0050.00718.00
7.1.330.0050.00915.88
7.1.320.0030.00615.79
7.1.310.0050.00815.90
7.1.300.0070.01015.57
7.1.290.0060.00715.73
7.1.280.0090.00615.66
7.1.270.0040.00715.67
7.1.260.0060.00915.71
7.1.250.0030.01115.98
7.1.200.0040.00415.82
7.1.100.0000.01118.16
7.1.70.1530.01315.04
7.1.60.2070.01332.89
7.1.50.2530.01033.10
7.1.40.2470.01732.68
7.1.30.3570.01332.71
7.1.20.2500.01332.94
7.1.10.1470.01014.83
7.1.00.1930.00714.64
7.0.200.2970.01314.93
7.0.190.3500.01714.91
7.0.180.2370.00714.22
7.0.170.3230.01714.61
7.0.160.2830.01314.41
7.0.150.1570.01014.48
7.0.140.2470.01314.50
7.0.130.1530.01314.68
7.0.120.2370.01314.95
7.0.110.1500.00014.62
7.0.100.0930.01314.41
7.0.90.0300.00714.48
7.0.80.0700.01714.58
7.0.70.0170.01014.44
7.0.60.2500.01314.30
7.0.50.2430.01714.39
7.0.40.2270.01014.51
7.0.30.2430.00714.84
7.0.20.2570.00714.46
7.0.10.1930.02014.78
7.0.00.1770.02014.61

preferences:
94.58 ms | 400 KiB | 5 Q