3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal { public function __call($name, $args) { if (preg_match('/^is([A-Z].+)/', $name, $matches)) { return $matches[1] === get_called_class(); } } } class Cat extends Animal { } class Dog extends Animal { } $brian = new Dog(); printf("Brian %s a dog", $brian->isDog() ? "is" : "is not" ); printf("Brian %s a cat", $brian->isCat() ? "is" : "is not" );

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.0100.01018.41
8.3.50.0110.00822.05
8.3.40.0110.00419.04
8.3.30.0070.00719.03
8.3.20.0070.00020.30
8.3.10.0040.00421.96
8.3.00.0040.00422.45
8.2.180.0140.00316.49
8.2.170.0090.00622.96
8.2.160.0110.00320.94
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0070.00717.63
8.2.110.0030.00622.33
8.2.100.0040.00819.39
8.2.90.0080.00019.08
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0030.00518.07
8.2.20.0030.00617.82
8.2.10.0000.00717.86
8.2.00.0040.00417.82
8.1.280.0070.01425.92
8.1.270.0080.00022.14
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0000.00924.01
8.1.230.0080.00419.16
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0000.00817.41
8.1.180.0060.00318.61
8.1.170.0040.00418.62
8.1.160.0000.00722.01
8.1.150.0000.00718.64
8.1.140.0000.00717.55
8.1.130.0070.00017.85
8.1.120.0070.00017.60
8.1.110.0040.00417.46
8.1.100.0000.00717.46
8.1.90.0050.00217.57
8.1.80.0000.00717.61
8.1.70.0030.00517.53
8.1.60.0100.00017.68
8.1.50.0030.00617.65
8.1.40.0060.00317.57
8.1.30.0040.00417.70
8.1.20.0000.00917.76
8.1.10.0000.00817.75
8.1.00.0030.00617.68
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0030.00518.41
8.0.270.0030.00317.35
8.0.260.0000.00716.82
8.0.250.0000.00716.90
8.0.240.0000.00916.94
8.0.230.0070.00017.09
8.0.220.0070.00016.98
8.0.210.0000.00716.91
8.0.200.0000.00717.00
8.0.190.0060.00316.94
8.0.180.0030.00616.87
8.0.170.0040.00417.03
8.0.160.0040.00417.04
8.0.150.0090.00016.94
8.0.140.0040.00416.91
8.0.130.0060.00013.41
8.0.120.0030.00517.01
8.0.110.0040.00417.03
8.0.100.0050.00216.96
8.0.90.0000.00816.86
8.0.80.0100.00617.04
8.0.70.0040.00416.91
8.0.60.0000.00716.82
8.0.50.0000.00717.03
8.0.30.0090.01217.31
8.0.20.0100.01117.40
8.0.10.0030.00316.90
8.0.00.0040.01916.88
7.4.330.0000.00515.05
7.4.320.0030.00316.73
7.4.300.0050.00316.82
7.4.290.0000.00816.82
7.4.280.0040.00416.80
7.4.270.0000.00916.87
7.4.260.0070.00016.82
7.4.250.0040.00416.83
7.4.240.0020.00616.85
7.4.230.0000.00816.90
7.4.220.0070.01116.86
7.4.210.0060.01016.74
7.4.200.0050.00316.56
7.4.190.0000.00716.79
7.4.160.0160.00016.83
7.4.150.0030.01417.40
7.4.140.0050.01417.86
7.4.130.0080.01116.87
7.4.120.0130.00816.75
7.4.110.0150.00616.73
7.4.100.0110.00816.89
7.4.90.0110.00616.59
7.4.80.0100.00719.39
7.4.70.0130.00316.74
7.4.60.0130.01016.50
7.4.50.0050.00316.55
7.4.40.0030.01022.77
7.4.30.0060.01316.86
7.4.00.0070.01015.01
7.3.330.0020.00213.36
7.3.320.0050.00013.57
7.3.310.0000.00716.49
7.3.300.0000.00716.58
7.3.290.0070.00716.36
7.3.280.0070.01016.41
7.3.270.0070.01017.40
7.3.260.0100.00716.55
7.3.250.0120.00916.58
7.3.240.0100.01316.52
7.3.230.0110.00716.46
7.3.210.0130.00316.33
7.3.200.0110.00619.39
7.3.190.0110.00616.50
7.3.180.0120.00516.58
7.3.170.0060.01016.66
7.3.160.0050.01116.69
7.3.120.0000.01515.10
7.2.330.0110.00716.66
7.2.320.0150.00616.80
7.2.310.0150.00916.73
7.2.300.0030.01416.74
7.2.290.0060.01016.64
7.2.00.0060.00619.73
7.1.100.0090.00618.48
7.1.70.0060.00317.27
7.1.60.0140.01019.82
7.1.50.0160.00717.13
7.1.00.0070.07322.48
7.0.200.0000.00916.60
7.0.140.0000.07722.11
7.0.60.0130.04319.93
7.0.50.0030.06717.74
7.0.40.0070.08720.12
7.0.30.0270.07720.35
7.0.20.0170.04320.18
7.0.10.0200.04320.08
7.0.00.0030.06020.08
5.6.280.0000.07720.79
5.6.210.0100.08020.53
5.6.200.0030.04318.13
5.6.190.0030.04720.49
5.6.180.3630.03720.61
5.6.170.0130.04320.71
5.6.160.0130.06720.44
5.6.150.0070.05318.23
5.6.140.0030.04018.18
5.6.130.0030.04718.17
5.6.120.0170.06720.97
5.6.110.0070.08321.04
5.6.100.0070.06721.09
5.6.90.0130.08320.95
5.6.80.0070.08020.51
5.5.350.0130.04320.48
5.5.340.0070.06717.99
5.5.330.0070.04020.40
5.5.320.0270.07720.25
5.5.310.0230.05020.27
5.5.300.0100.04018.08
5.5.290.0070.08017.95
5.5.280.0170.07720.86
5.5.270.0070.04320.87
5.5.260.0070.06720.65
5.5.250.0030.07320.66
5.5.240.0170.08020.05
5.4.450.0200.05019.55
5.4.440.0600.05319.61
5.4.430.0130.05319.21
5.4.420.0030.06019.56
5.4.410.0170.05319.57
5.4.400.5570.00018.82
5.4.390.0830.00018.78
5.4.380.0270.06018.79
5.4.370.0130.06318.61
5.4.360.0230.05318.78
5.4.350.0330.05318.81
5.4.340.0270.05018.84
5.4.320.0090.03212.50
5.4.310.0040.04812.50
5.4.300.0060.03912.50
5.4.290.0060.04112.50
5.4.280.0060.04312.39
5.4.270.0070.05318.93
5.4.260.0200.06318.95
5.4.250.0200.05018.98
5.4.240.0200.04318.89
5.4.230.0170.04318.89
5.4.220.0070.05319.07
5.4.210.0070.05018.90
5.4.200.0070.05318.94
5.4.190.0100.05718.98
5.4.180.0100.04718.77
5.4.170.0100.07018.98
5.4.160.0100.05018.98
5.4.150.0130.05018.64
5.4.140.0030.05316.48
5.4.130.0030.05016.45
5.4.120.0100.04716.62
5.4.110.0170.04316.54
5.4.100.0070.05016.53
5.4.90.0100.06716.45
5.4.80.0130.04016.61
5.4.70.0100.05016.65
5.4.60.0070.07016.29
5.4.50.0030.05016.46
5.4.40.0070.05016.63
5.4.30.0000.05316.48
5.4.20.0100.08016.45
5.4.10.0070.05316.36
5.4.00.0130.04016.04
5.3.290.0060.04512.80
5.3.280.0100.04714.59
5.3.270.0170.04314.67
5.3.260.0070.05314.74
5.3.250.0030.05314.62
5.3.240.0070.07714.69
5.3.230.0030.05314.79
5.3.220.0070.05714.54
5.3.210.0000.06014.79
5.3.200.0000.05314.39
5.3.190.0030.05314.59
5.3.180.0100.04314.55
5.3.170.0100.05714.47
5.3.160.0070.05014.54
5.3.150.0030.05314.63
5.3.140.0030.05014.56
5.3.130.0030.05314.63
5.3.120.0100.04714.55
5.3.110.0200.06314.64
5.3.100.0100.07014.00
5.3.90.0070.07314.10
5.3.80.0130.04714.20
5.3.70.0070.05013.92
5.3.60.0100.05014.10
5.3.50.0100.04713.95
5.3.40.0130.06314.17
5.3.30.0030.05313.91
5.3.20.0100.06713.78
5.3.10.0100.04313.66
5.3.00.0070.05713.72
5.2.170.0100.04011.32
5.2.160.0130.05311.32
5.2.150.0100.03711.10
5.2.140.0070.04010.98
5.2.130.0070.05711.18
5.2.120.0100.04011.18
5.2.110.0100.05011.19
5.2.100.0030.04011.18
5.2.90.0070.03711.11
5.2.80.0030.04311.25
5.2.70.0030.04311.17
5.2.60.0000.04711.04
5.2.50.0070.04011.09
5.2.40.0030.04011.07
5.2.30.0070.04011.04
5.2.20.0130.03310.92
5.2.10.0000.04310.69
5.2.00.0100.05710.79
5.1.60.0100.0279.92
5.1.50.0070.03710.09
5.1.40.0070.03010.08
5.1.30.0070.03010.33
5.1.20.0030.03710.31
5.1.10.0070.03310.27
5.1.00.0070.03310.11
5.0.50.0100.0338.64
5.0.40.0100.0208.41
5.0.30.0030.0508.32
5.0.20.0000.0308.29
5.0.10.0030.0338.24
5.0.00.0070.0478.16
4.4.90.0030.0206.20
4.4.80.0000.0236.20
4.4.70.0070.0206.14
4.4.60.0030.0206.11
4.4.50.0030.0206.10
4.4.40.0030.0376.07
4.4.30.0030.0206.07
4.4.20.0070.0176.07
4.4.10.0000.0276.07
4.4.00.0030.0436.07
4.3.110.0000.0236.07
4.3.100.0070.0176.07
4.3.90.0030.0206.07
4.3.80.0000.0336.07
4.3.70.0030.0206.07
4.3.60.0030.0306.07
4.3.50.0000.0276.07
4.3.40.0030.0336.07
4.3.30.0000.0306.07
4.3.20.0070.0276.07
4.3.10.0070.0236.07
4.3.00.0070.0177.29

preferences:
58.94 ms | 401 KiB | 5 Q