3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call($f) { return $f(); } class A { protected $a; public function foo() { echo strtolower( call(function() { set_error_handler(function() {}); $class = get_called_class(); restore_error_handler(); return $class; })); } } $a = new A; $a->foo();

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.0090.00618.43
8.3.50.0150.00321.21
8.3.40.0100.01018.84
8.3.30.0100.00320.25
8.3.20.0040.00420.39
8.3.10.0040.00421.97
8.3.00.0080.00022.58
8.2.180.0120.00316.63
8.2.170.0100.00322.96
8.2.160.0080.00620.35
8.2.150.0070.00024.18
8.2.140.0120.00624.66
8.2.130.0000.00726.16
8.2.120.0080.00019.76
8.2.110.0060.00322.10
8.2.100.0110.00019.32
8.2.90.0040.00419.05
8.2.80.0080.00018.04
8.2.70.0060.00317.63
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0030.00618.16
8.2.30.0040.00417.93
8.2.20.0040.00417.72
8.2.10.0040.00417.74
8.2.00.0100.00317.74
8.1.280.0110.00725.92
8.1.270.0040.00420.45
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.96
8.1.230.0070.00418.98
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0080.00017.36
8.1.190.0050.00317.28
8.1.180.0000.00818.62
8.1.170.0040.00418.64
8.1.160.0000.00722.19
8.1.150.0040.00418.61
8.1.140.0030.00617.48
8.1.130.0000.00817.93
8.1.120.0040.00417.43
8.1.110.0040.00417.48
8.1.100.0030.00617.41
8.1.90.0000.00717.45
8.1.80.0050.00217.44
8.1.70.0000.00817.36
8.1.60.0040.00417.62
8.1.50.0000.00717.37
8.1.40.0000.00717.55
8.1.30.0020.00517.58
8.1.20.0060.00317.56
8.1.10.0000.00717.63
8.1.00.0000.01017.41
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0030.00318.35
8.0.270.0030.00317.25
8.0.260.0040.00416.93
8.0.250.0030.00316.82
8.0.240.0080.00016.86
8.0.230.0070.00016.79
8.0.220.0000.00716.79
8.0.210.0050.00216.73
8.0.200.0000.00616.81
8.0.190.0050.00316.99
8.0.180.0040.00416.97
8.0.170.0000.00816.80
8.0.160.0000.00716.75
8.0.150.0000.00716.75
8.0.140.0000.01016.86
8.0.130.0050.00013.38
8.0.120.0070.00016.74
8.0.110.0050.00316.93
8.0.100.0000.00716.95
8.0.90.0040.00416.69
8.0.80.0030.01216.84
8.0.70.0030.00416.93
8.0.60.0040.00416.93
8.0.50.0000.00716.90
8.0.30.0060.01317.08
8.0.20.0090.00917.40
8.0.10.0070.00016.98
8.0.00.0060.01416.79
7.4.330.0060.00015.00
7.4.320.0000.00616.36
7.4.300.0050.00216.61
7.4.290.0020.00516.51
7.4.280.0030.00316.51
7.4.270.0070.00016.50
7.4.260.0030.00316.60
7.4.250.0030.00316.48
7.4.240.0020.00516.57
7.4.230.0000.00716.48
7.4.220.0060.01216.53
7.4.210.0090.00816.53
7.4.200.0000.00716.68
7.4.190.0030.00316.77
7.4.160.0150.00016.25
7.4.150.0090.00917.40
7.4.140.0130.00817.86
7.4.130.0100.01216.54
7.4.120.0070.00916.50
7.4.110.0130.01016.31
7.4.100.0100.00716.43
7.4.90.0030.01416.71
7.4.80.0100.01319.39
7.4.70.0090.00816.47
7.4.60.0100.02616.64
7.4.50.0030.00616.47
7.4.40.0120.00822.77
7.4.30.0030.01616.54
7.4.00.0060.00915.11
7.3.330.0000.00513.28
7.3.320.0000.00613.30
7.3.310.0070.00016.40
7.3.300.0000.00616.21
7.3.290.0120.00416.28
7.3.280.0050.01116.28
7.3.270.0070.01017.40
7.3.260.0140.00416.29
7.3.250.0070.01016.40
7.3.240.0150.00416.57
7.3.230.0070.01316.39
7.3.210.0110.00616.37
7.3.200.0130.00619.39
7.3.190.0040.01016.35
7.3.180.0130.00916.21
7.3.170.0090.00916.32
7.3.160.0090.00616.41
7.3.120.0030.01014.57
7.3.00.0130.00316.34
7.2.330.0120.00616.70
7.2.320.0160.00416.44
7.2.310.0030.01616.78
7.2.300.0140.00616.70
7.2.290.0100.00616.62
7.2.130.0060.01217.00
7.2.120.0000.01016.99
7.2.110.0040.00816.62
7.2.100.0040.01216.82
7.2.90.0180.00416.97
7.2.80.0030.01016.74
7.2.70.0100.00317.02
7.2.60.0060.00616.88
7.2.50.0130.00016.55
7.2.40.0090.00617.02
7.2.30.0070.01116.96
7.2.20.0040.01116.74
7.2.10.0090.00616.89
7.2.00.0130.00716.80
7.1.250.0030.01015.39
7.1.240.0030.01015.63
7.1.230.0030.00715.39
7.1.220.0000.01015.82
7.1.210.0030.00615.78
7.1.200.0050.00915.54
7.1.190.0060.00315.76
7.1.180.0060.00615.47
7.1.170.0030.00615.65
7.1.160.0080.00415.59
7.1.150.0030.01015.41
7.1.140.0030.00715.41
7.1.130.0120.00315.73
7.1.120.0000.00815.61
7.1.110.0090.00315.36
7.1.100.0030.01016.94
7.1.90.0060.00815.41
7.1.80.0090.00615.50
7.1.70.0060.00716.36
7.1.60.0110.00317.40
7.1.50.0100.00716.27
7.1.40.0120.00315.45
7.1.30.0050.00315.72
7.1.20.0030.00915.29
7.1.10.0030.01015.72
7.1.00.0090.02918.85
7.0.330.0070.00715.13
7.0.320.0110.00415.41
7.0.310.0000.01215.34
7.0.300.0090.00915.02
7.0.290.0070.00315.35
7.0.280.0090.00615.53
7.0.270.0000.00915.32
7.0.260.0030.00915.23
7.0.250.0030.00615.41
7.0.240.0060.00315.45
7.0.230.0030.00715.17
7.0.220.0000.00815.31
7.0.210.0030.01015.09
7.0.200.0030.00816.11
7.0.190.0100.00615.38
7.0.180.0040.01115.26
7.0.170.0070.00315.29
7.0.160.0030.00815.45
7.0.150.0030.01015.46
7.0.140.0130.03318.72
7.0.130.0070.00715.20
7.0.120.0160.00615.21
7.0.110.0000.01015.29
7.0.100.0030.00515.23
7.0.90.0070.00315.29
7.0.80.0070.00415.14
7.0.70.0060.00315.11
7.0.60.0200.04117.66
7.0.50.0070.04216.60
7.0.40.0070.04816.83
7.0.30.0130.03516.78
7.0.20.0190.04216.88
7.0.10.0060.03816.85
7.0.00.0030.02716.58
5.6.380.0050.00314.45
5.6.370.0000.00813.93
5.6.360.0050.00514.30
5.6.350.0030.01014.19
5.6.340.0090.00914.35
5.6.330.0080.00814.58
5.6.320.0040.00414.01
5.6.310.0090.00314.56
5.6.300.0160.00314.43
5.6.290.0040.00714.37
5.6.280.0050.03817.56
5.6.270.0000.01213.84
5.6.260.0130.00614.20
5.6.250.0070.00714.07
5.6.240.0030.01014.35
5.6.230.0040.00714.24
5.6.220.0110.00014.19
5.6.210.0040.04417.36
5.6.200.0040.04416.31
5.6.190.0070.03517.28
5.6.180.0100.02317.51
5.6.170.0200.04417.24
5.6.160.0080.02217.36
5.6.150.0020.02716.21
5.6.140.0100.03216.41
5.6.130.0020.04616.16
5.6.120.0050.04617.62
5.6.110.0030.04617.56
5.6.100.0160.03517.71
5.6.90.0120.03117.51
5.6.80.0060.04117.38
5.6.70.0040.00714.29
5.6.60.0030.00914.38
5.6.50.0100.00313.91
5.6.40.0070.00714.07
5.6.30.0090.00314.50
5.6.20.0090.00013.91
5.6.10.0040.01114.01
5.6.00.0040.00414.17
5.5.380.0110.00011.11
5.5.370.0040.00411.08
5.5.360.0000.00810.90
5.5.350.0230.03515.76
5.5.340.0050.03014.57
5.5.330.0060.04215.76
5.5.320.0180.03615.70
5.5.310.0130.03915.79
5.5.300.0060.04514.53
5.5.290.0080.02814.69
5.5.280.0100.04515.78
5.5.270.0030.04315.91
5.5.260.0030.04715.84
5.5.250.0060.04315.93
5.5.240.0000.04315.60
5.5.230.0030.00710.93
5.5.220.0040.00711.13
5.5.210.0030.00310.90
5.5.200.0070.00411.20
5.5.190.0090.00011.21
5.5.180.0030.00711.14
5.5.170.0030.00510.90
5.5.160.0060.00611.28
5.5.150.0050.00310.90
5.5.140.0050.00010.90
5.5.130.0030.00611.19
5.5.120.0070.00410.90
5.5.110.0030.00311.06
5.5.100.0030.00711.09
5.5.90.0040.00411.20
5.5.80.0000.00611.01
5.5.70.0030.00310.90
5.5.60.0030.00711.20
5.5.50.0000.00810.98
5.5.40.0060.00010.90
5.5.30.0000.01110.91
5.5.20.0030.00310.95
5.5.10.0000.00711.06
5.5.00.0060.00311.15
5.4.450.1990.02215.24
5.4.440.0110.02115.23
5.4.430.0730.03515.27
5.4.420.2530.02015.12
5.4.410.1940.02215.24
5.4.400.1970.01915.09
5.4.390.1900.02314.93
5.4.380.1300.02215.06
5.4.370.1880.02115.09
5.4.360.1680.02314.92
5.4.350.1570.02015.03
5.4.340.1330.02315.00
5.4.330.0070.00411.07
5.4.320.1820.02215.04
5.4.310.1870.02115.06
5.4.300.2000.02014.98
5.4.290.1940.01615.01
5.4.280.1900.02615.02
5.4.270.1890.02015.03
5.4.260.1880.01715.10
5.4.250.1980.01814.93
5.4.240.1850.02215.03
5.4.230.1840.02015.06
5.4.220.0810.01715.06
5.4.210.0020.02114.91
5.4.200.0510.03415.09
5.4.190.2200.02015.18
5.4.180.1900.01914.98
5.4.170.1800.02714.93
5.4.160.1980.02215.04
5.4.150.2070.02015.04
5.4.140.1950.02213.66
5.4.130.1940.02013.73
5.4.120.2170.02113.83
5.4.110.0030.03213.76
5.4.100.1330.02513.76
5.4.90.2130.02113.79
5.4.80.2130.02313.89
5.4.70.2510.02313.73
5.4.60.1820.01913.73
5.4.50.1950.01713.59
5.4.40.1880.01813.65
5.4.30.2020.01513.69
5.4.20.1970.02213.75
5.4.10.1850.02413.55
5.4.00.1700.01813.38
5.3.290.1860.01812.86
5.3.280.1950.02112.75
5.3.270.1820.02512.79
5.3.260.1850.02012.77
5.3.250.2030.02112.70
5.3.240.2130.02212.84
5.3.230.1970.02312.70
5.3.220.1670.02212.68
5.3.210.0020.04212.77
5.3.200.0070.04012.76
5.3.190.1970.02112.82
5.3.180.1970.02012.75
5.3.170.1930.02412.74
5.3.160.1880.01812.81
5.3.150.1920.02412.81
5.3.140.1890.01812.69
5.3.130.1970.02212.67
5.3.120.1890.02212.80
5.3.110.1990.02012.74
5.3.100.2080.02012.49
5.3.90.1910.02412.50
5.3.80.2040.02212.46
5.3.70.1970.01712.45
5.3.60.2130.01812.48
5.3.50.1960.02012.43
5.3.40.2090.02212.40
5.3.30.1930.02012.43
5.3.20.1810.02112.30
5.3.10.1990.02112.32
5.3.00.2000.01712.35
5.2.170.1800.01511.02
5.2.160.1670.01611.00
5.2.150.1650.01711.03
5.2.140.2130.01810.98
5.2.130.1680.02811.03
5.2.120.1600.01811.00
5.2.110.1670.01511.02
5.2.100.1510.01611.00
5.2.90.1650.01710.95
5.2.80.1720.01711.02
5.2.70.1680.01810.98
5.2.60.1650.01511.05
5.2.50.1600.01611.03
5.2.40.1500.01310.96
5.2.30.1450.01510.95
5.2.20.1460.01210.92
5.2.10.1330.02010.89
5.2.00.1450.01710.78
5.1.60.1340.01110.46
5.1.50.1050.01710.43
5.1.40.1260.01310.44
5.1.30.1820.02010.62
5.1.20.1330.01710.61
5.1.10.1380.01310.47
5.1.00.1360.01510.51
5.0.50.0730.0179.80
5.0.40.0630.0179.68
5.0.30.0750.0209.56
5.0.20.0700.0129.51
5.0.10.0870.0109.55
5.0.00.0710.0189.52
4.4.90.0770.0108.39
4.4.80.0790.0108.39
4.4.70.0730.0088.39
4.4.60.0600.0108.41
4.4.50.0760.0108.39
4.4.40.0680.0118.39
4.4.30.0680.0128.39
4.4.20.0750.0118.40
4.4.10.0740.0128.39
4.4.00.0400.0188.41
4.3.110.0750.0128.39
4.3.100.0780.0088.39
4.3.90.0750.0108.39
4.3.80.0900.0158.39
4.3.70.0310.0088.39
4.3.60.0370.0088.39
4.3.50.0360.0088.39
4.3.40.0420.0158.39
4.3.30.0120.0118.39
4.3.20.0110.0118.39
4.3.10.0120.0118.39
4.3.00.0310.0088.39

preferences:
47.53 ms | 401 KiB | 5 Q