3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $id; protected $text; public function __get($name) { $methodName = 'get' . ucfirst($name); return method_exists($this, $methodName) ? $this->{$methodName}() : $this->{$name}; } public function __set($name, $value) { $methodName = 'set' . ucfirst($name); return method_exists($this, $methodName) ? $this->{$methodName}($value) : $this->{$name} = $value; } public function __isset($name) { return property_exists($this, $name); } public function setText($text) { $this->text = $text . ' World!'; } } $foo = new Foo(); $foo->id = 1; $foo->text = 'Hello'; echo $foo->id; // 1 echo $foo->text; // Hello World!

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.0110.00718.43
8.3.50.0140.00621.99
8.3.40.0070.00718.85
8.3.30.0110.00420.34
8.3.20.0080.00018.90
8.3.10.0080.00020.84
8.3.00.0080.00019.68
8.2.180.0040.01116.63
8.2.170.0070.00722.96
8.2.160.0070.00720.38
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00421.05
8.2.110.0120.00922.19
8.2.100.0030.00917.91
8.2.90.0000.00719.28
8.2.80.0030.00619.23
8.2.70.0030.00617.63
8.2.60.0050.00317.90
8.2.50.0000.00918.07
8.2.40.0040.00418.28
8.2.30.0030.00521.25
8.2.20.0050.00217.70
8.2.10.0040.00417.66
8.2.00.0030.00617.69
8.1.280.0040.01125.92
8.1.270.0080.00023.99
8.1.260.0070.01426.35
8.1.250.0000.00928.09
8.1.240.0000.01022.23
8.1.230.0040.00721.04
8.1.220.0030.00618.77
8.1.210.0080.00019.01
8.1.200.0060.00317.38
8.1.190.0020.00517.53
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0000.00718.82
8.1.150.0000.00818.70
8.1.140.0050.00217.38
8.1.130.0030.00517.75
8.1.120.0050.00317.49
8.1.110.0020.00517.37
8.1.100.0000.00817.50
8.1.90.0040.00417.38
8.1.80.0030.00317.37
8.1.70.0000.00717.43
8.1.60.0030.00617.48
8.1.50.0000.00717.53
8.1.40.0000.00717.57
8.1.30.0030.00617.68
8.1.20.0060.00317.68
8.1.10.0080.00017.52
8.1.00.0000.00817.50
8.0.300.0070.00419.88
8.0.290.0040.00417.05
8.0.280.0030.00318.34
8.0.270.0080.00017.14
8.0.260.0000.00616.82
8.0.250.0070.00016.85
8.0.240.0040.00416.88
8.0.230.0040.00416.90
8.0.220.0000.00716.78
8.0.210.0000.00716.80
8.0.200.0030.00317.02
8.0.190.0070.00016.93
8.0.180.0050.00216.76
8.0.170.0040.00416.93
8.0.160.0000.01116.93
8.0.150.0080.00016.97
8.0.140.0040.00416.79
8.0.130.0030.00313.28
8.0.120.0040.00416.85
8.0.110.0020.00516.77
8.0.100.0000.00816.86
8.0.90.0040.00416.90
8.0.80.0150.00816.93
8.0.70.0000.00816.95
8.0.60.0040.00416.95
8.0.50.0000.00816.73
8.0.30.0110.01117.05
8.0.20.0130.00717.40
8.0.10.0000.00716.82
8.0.00.0070.01016.84
7.4.330.0000.00616.85
7.4.320.0000.00716.45
7.4.300.0030.00316.61
7.4.290.0030.00316.60
7.4.280.0030.00316.60
7.4.270.0020.00516.47
7.4.260.0030.00313.40
7.4.250.0040.00416.38
7.4.240.0000.00816.54
7.4.230.0030.00316.36
7.4.220.0090.00916.42
7.4.210.0080.00816.60
7.4.200.0030.00316.43
7.4.190.0000.00716.39
7.4.160.0100.00516.43
7.4.150.0170.00017.40
7.4.140.0090.00917.86
7.4.130.0060.01116.59
7.4.120.0110.00816.50
7.4.110.0100.00716.63
7.4.100.0030.01516.47
7.4.90.0150.00916.51
7.4.80.0070.01119.39
7.4.70.0100.00616.46
7.4.60.0110.00816.61
7.4.50.0040.00416.32
7.4.40.0000.01522.77
7.4.30.0040.01516.53
7.4.00.0060.00915.03
7.3.330.0060.00013.36
7.3.320.0030.00313.37
7.3.310.0000.00716.25
7.3.300.0000.00716.34
7.3.290.0000.01316.49
7.3.280.0050.01016.36
7.3.270.0170.00317.40
7.3.260.0110.00918.24
7.3.250.0110.00616.42
7.3.240.0130.00316.34
7.3.230.0120.00416.46
7.3.210.0030.01416.42
7.3.200.0110.00819.39
7.3.190.0130.01016.64
7.3.180.0090.00616.52
7.3.170.0060.00916.27
7.3.160.0060.01016.59
7.3.120.0060.01014.83
7.3.10.0130.00316.35
7.3.00.0040.00916.51
7.2.330.0060.01216.68
7.2.320.0170.00616.77
7.2.310.0090.00916.51
7.2.300.0120.00916.76
7.2.290.0080.00816.71
7.2.130.0060.00616.80
7.2.120.0030.01016.73
7.2.110.0030.00916.78
7.2.100.0040.00916.68
7.2.90.0070.00716.68
7.2.80.0080.00816.77
7.2.70.0070.00716.89
7.2.60.0050.00816.95
7.2.50.0060.00716.88
7.2.40.0070.00516.81
7.2.30.0030.00816.74
7.2.20.0060.00716.79
7.2.10.0040.00816.89
7.2.00.0050.00716.80
7.1.250.0050.00515.60
7.1.240.0030.00715.61
7.1.230.0030.00815.79
7.1.220.0090.00615.87
7.1.210.0030.01015.78
7.1.200.0050.00915.81
7.1.190.0000.01115.85
7.1.180.0000.00815.79
7.1.170.0030.00915.70
7.1.160.0040.00715.44
7.1.150.0080.00415.78
7.1.140.0060.00315.56
7.1.130.0040.00715.61
7.1.120.0040.00715.82
7.1.110.0100.00015.61
7.1.100.0030.00916.99
7.1.90.0060.00615.61
7.1.80.0110.00015.75
7.1.70.0090.00016.30
7.1.60.0070.01117.50
7.1.50.0030.01516.40
7.1.40.0060.00915.52
7.1.30.0040.00415.81
7.1.20.0000.00915.79
7.1.10.0070.00715.88
7.1.00.0020.02419.02
7.0.330.0060.00315.21
7.0.320.0050.00515.43
7.0.310.0090.00615.37
7.0.300.0070.01015.44
7.0.290.0130.00015.54
7.0.280.0040.00415.11
7.0.270.0060.00615.24
7.0.260.0070.00315.07
7.0.250.0030.00715.51
7.0.240.0110.00415.25
7.0.230.0040.00715.47
7.0.220.0070.00715.47
7.0.210.0030.00915.58
7.0.200.0020.00716.04
7.0.190.0110.00415.44
7.0.180.0030.00715.58
7.0.170.0040.01115.47
7.0.160.0030.00915.52
7.0.150.0000.01015.41
7.0.140.0030.03918.80
7.0.130.0030.00915.49
7.0.120.0030.00615.52
7.0.110.0030.00615.51
7.0.100.0060.00915.51
7.0.90.0080.00515.44
7.0.80.0070.00315.47
7.0.70.0040.00415.57
7.0.60.0080.04217.47
7.0.50.0100.04016.79
7.0.40.0100.04616.75
7.0.30.0200.03516.88
7.0.20.0140.04216.88
7.0.10.0070.03216.80
7.0.00.0080.04016.74
5.6.380.0050.00314.21
5.6.370.0000.01014.29
5.6.360.0060.00614.46
5.6.350.0100.00314.30
5.6.340.0060.00314.29
5.6.330.0060.00913.97
5.6.320.0060.00614.49
5.6.310.0110.00414.16
5.6.300.0060.00914.41
5.6.290.0000.01414.30
5.6.280.0070.03717.69
5.6.270.0060.00314.52
5.6.260.0110.00414.34
5.6.250.0070.00714.28
5.6.240.0030.00714.65
5.6.230.0060.00814.33
5.6.220.0070.01014.44
5.6.210.0060.04617.54
5.6.200.0110.04116.13
5.6.190.0100.04017.36
5.6.180.1920.02117.35
5.6.170.0190.04217.41
5.6.160.0050.03017.40
5.6.150.0100.04116.25
5.6.140.0070.02516.33
5.6.130.0070.03616.34
5.6.120.0080.02517.70
5.6.110.0140.03817.59
5.6.100.0070.04517.73
5.6.90.0130.04017.86
5.6.80.0040.02417.35
5.6.70.2050.02217.40
5.6.60.0000.01614.01
5.6.50.0030.00714.26
5.6.40.0120.00013.98
5.6.30.0080.00014.10
5.6.20.0070.00714.20
5.6.10.0040.00814.11
5.6.00.0060.00914.29
5.5.380.0000.01010.98
5.5.370.0040.00411.16
5.5.360.0110.00011.51
5.5.350.0040.03615.88
5.5.340.0040.03514.52
5.5.330.0040.03915.66
5.5.320.0190.04015.69
5.5.310.0260.03915.70
5.5.300.0120.03314.63
5.5.290.0040.02414.66
5.5.280.0060.03215.92
5.5.270.0050.04715.97
5.5.260.0070.03215.98
5.5.250.0090.04415.83
5.5.240.0030.03715.68
5.5.230.0050.00511.01
5.5.220.0050.00510.90
5.5.210.0060.00311.18
5.5.200.0000.00911.01
5.5.190.0040.00411.21
5.5.180.0060.00311.20
5.5.170.0030.00311.18
5.5.160.0030.00611.04
5.5.150.0060.00311.05
5.5.140.0000.00711.39
5.5.130.0030.00610.98
5.5.120.0000.00711.22
5.5.110.0040.00411.29
5.5.100.0030.00711.09
5.5.90.0040.01111.09
5.5.80.0060.00310.90
5.5.70.0040.00410.92
5.5.60.0060.00610.90
5.5.50.0030.00710.98
5.5.40.0030.00710.93
5.5.30.0000.00611.28
5.5.20.0000.01111.26
5.5.10.0080.00310.91
5.5.00.0060.00311.15
5.4.450.0160.02615.28
5.4.440.0140.04215.19
5.4.430.0120.02715.13
5.4.420.0170.03215.40
5.4.410.0170.02515.19
5.4.400.0130.02815.12
5.4.390.0150.02714.97
5.4.380.0150.02415.06
5.4.370.0190.03715.23
5.4.360.0150.04215.07
5.4.350.0200.03515.11
5.4.340.0150.02714.99
5.4.330.0030.00711.18
5.4.320.0190.02214.92
5.4.310.0260.02215.21
5.4.300.0140.02515.06
5.4.290.0170.04014.94
5.4.280.0180.04015.02
5.4.270.0170.03914.91
5.4.260.0080.03715.24
5.4.250.0140.02015.04
5.4.240.0220.03515.11
5.4.230.0280.02815.10
5.4.220.0150.03915.12
5.4.210.0140.03715.04
5.4.200.0180.03514.93
5.4.190.0120.03114.97
5.4.180.0120.02515.07
5.4.170.0080.04515.06
5.4.160.0120.03214.99
5.4.150.0170.03914.93
5.4.140.0200.03513.81
5.4.130.0130.03913.63
5.4.120.0170.02313.70
5.4.110.0140.02513.71
5.4.100.0200.03613.58
5.4.90.0210.03813.59
5.4.80.0210.03113.72
5.4.70.0190.03713.63
5.4.60.0150.02813.65
5.4.50.0230.03213.71
5.4.40.0210.03613.68
5.4.30.0200.04213.63
5.4.20.0220.02513.77
5.4.10.0140.02413.71
5.4.00.0250.03213.52
5.3.290.0100.04212.81
5.3.280.0160.03412.74
5.3.270.0080.02412.83
5.3.260.0120.04112.74
5.3.250.0150.02312.81
5.3.240.0160.02612.75
5.3.230.0120.04012.78
5.3.220.0150.01812.80
5.3.210.0160.02312.80
5.3.200.0100.03012.73
5.3.190.0160.04212.74
5.3.180.0180.03512.74
5.3.170.0120.02812.76
5.3.160.0140.02612.70
5.3.150.0220.03412.74
5.3.140.0150.03512.72
5.3.130.0250.03312.68
5.3.120.0220.03612.84
5.3.110.0170.02512.69
5.3.100.0240.03212.47
5.3.90.0200.03112.47
5.3.80.0200.03512.47
5.3.70.0180.02212.43
5.3.60.0110.02712.46
5.3.50.0140.04012.49
5.3.40.0180.02312.38
5.3.30.0250.03012.42
5.3.20.0130.02312.36
5.3.10.0230.01712.33
5.3.00.0130.02312.26
5.2.170.0130.02311.41
5.2.160.0120.03011.41
5.2.150.0070.02011.41
5.2.140.0070.02711.41
5.2.130.0080.01811.41
5.2.120.0170.02911.41
5.2.110.0120.02711.41
5.2.100.0150.02011.41
5.2.90.0130.03111.41
5.2.80.0120.02211.41
5.2.70.0100.02711.41
5.2.60.0080.02011.41
5.2.50.0130.02511.41
5.2.40.0080.03211.41
5.2.30.0140.02511.41
5.2.20.0120.03211.41
5.2.10.0090.01711.41
5.2.00.0080.03111.41
5.1.60.0160.02511.41
5.1.50.0100.02711.41
5.1.40.0100.02511.41
5.1.30.0120.02611.41
5.1.20.0080.02911.41
5.1.10.0120.03011.41
5.1.00.0130.02611.41
5.0.50.0060.02711.41
5.0.40.0080.01711.41
5.0.30.0070.03511.41
5.0.20.0080.01711.41
5.0.10.0060.02011.41
5.0.00.0090.03011.41
4.4.90.0050.01511.41
4.4.80.0020.02211.41
4.4.70.0050.02011.41
4.4.60.0050.01711.41
4.4.50.0040.01911.41
4.4.40.0050.01911.41
4.4.30.0050.02111.41
4.4.20.0050.01311.41
4.4.10.0030.01911.41
4.4.00.0050.02711.41
4.3.110.0090.01111.41
4.3.100.0070.01511.41
4.3.90.0080.01411.41
4.3.80.0050.01511.41
4.3.70.0070.01811.41
4.3.60.0090.01311.41
4.3.50.0070.01711.41
4.3.40.0070.01911.41
4.3.30.0050.01911.41
4.3.20.0030.02011.41
4.3.10.0050.01111.41
4.3.00.0030.01211.41

preferences:
70.27 ms | 400 KiB | 5 Q