3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $name; function __construct($param){ $this->name = 'liming'.'<br>'; } function getName() { echo $this->name; } // 调用子类中的方法getAge2 function getAge() { $this->getAge2(); } function getAge3() { return '23'; } } class B extends A { function getAge2(){ echo $this->getAge3(); } } (new A)->getAge();

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.00418.43
8.3.50.0070.00718.06
8.3.40.0070.00718.77
8.3.30.0120.00318.68
8.3.20.0040.00421.88
8.3.10.0000.00721.81
8.3.00.0080.00023.47
8.2.180.0070.01116.97
8.2.170.0110.00322.96
8.2.160.0070.00720.39
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00719.03
8.2.120.0040.00426.35
8.2.110.0060.00320.52
8.2.100.0040.00817.91
8.2.90.0040.00419.06
8.2.80.0040.00417.97
8.2.70.0040.00417.90
8.2.60.0050.00317.63
8.2.50.0040.00418.10
8.2.40.0060.00320.55
8.2.30.0080.00019.28
8.2.20.0060.00317.87
8.2.10.0050.00317.55
8.2.00.0040.00417.89
8.1.280.0140.00725.92
8.1.270.0040.00423.95
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00922.01
8.1.230.0040.00817.71
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00517.23
8.1.190.0040.00417.00
8.1.180.0080.00018.10
8.1.170.0080.00018.65
8.1.160.0000.00718.84
8.1.150.0000.00720.26
8.1.140.0050.00317.57
8.1.130.0000.00720.64
8.1.120.0030.00317.33
8.1.110.0030.00517.32
8.1.100.0040.00417.32
8.1.90.0040.00417.23
8.1.80.0000.00717.27
8.1.70.0030.00317.23
8.1.60.0050.00517.46
8.1.50.0000.00717.49
8.1.40.0090.00017.51
8.1.30.0000.00817.46
8.1.20.0040.00417.45
8.1.10.0000.00817.55
8.1.00.0090.00317.42
8.0.300.0000.00718.77
8.0.290.0000.00816.60
8.0.280.0030.00518.38
8.0.270.0070.00017.18
8.0.260.0000.00616.88
8.0.250.0000.00717.02
8.0.240.0040.00416.85
8.0.230.0000.00716.98
8.0.220.0070.00016.85
8.0.210.0000.00716.91
8.0.200.0000.00716.96
8.0.190.0040.00416.96
8.0.180.0000.00716.92
8.0.170.0060.00316.79
8.0.160.0030.00516.88
8.0.150.0030.00516.83
8.0.140.0050.00316.77
8.0.130.0000.00613.31
8.0.120.0030.00516.84
8.0.110.0030.00516.87
8.0.100.0000.00816.93
8.0.90.0000.00816.72
8.0.80.0000.01516.93
8.0.70.0000.00716.93
8.0.60.0040.00416.98
8.0.50.0040.00416.93
8.0.30.0090.00917.03
8.0.20.0150.00717.40
8.0.10.0040.00417.03
8.0.00.0130.00416.83
7.4.330.0000.00515.55
7.4.320.0030.00316.30
7.4.300.0030.00316.39
7.4.290.0030.00616.43
7.4.280.0000.00816.52
7.4.270.0040.00416.50
7.4.260.0040.00416.44
7.4.250.0050.00316.45
7.4.240.0040.00416.48
7.4.230.0050.00316.43
7.4.220.0000.00716.33
7.4.210.0100.00316.58
7.4.200.0040.00416.46
7.4.160.0080.00816.47
7.4.140.0100.00917.86
7.4.130.0100.00716.55
7.4.120.0110.00916.54
7.4.110.0120.00416.74
7.4.100.0180.00616.39
7.4.90.0090.00916.55
7.4.80.0090.01519.39
7.4.70.0030.01416.59
7.4.60.0110.00516.47
7.4.50.0080.00516.51
7.4.40.0070.00716.48
7.4.00.0060.01114.95
7.3.330.0030.00313.35
7.3.320.0060.00013.19
7.3.310.0020.00516.41
7.3.300.0000.00716.22
7.3.290.0090.00616.34
7.3.280.0080.01016.36
7.3.260.0050.01416.32
7.3.250.0080.01116.42
7.3.240.0100.00616.42
7.3.230.0030.01316.56
7.3.210.0100.00716.59
7.3.200.0060.01016.38
7.3.190.0030.01416.30
7.3.180.0130.01016.62
7.3.170.0080.00816.58
7.3.160.0040.01216.54
7.3.120.0110.00714.97
7.3.110.0040.01414.75
7.3.100.0130.00614.40
7.3.90.0110.00714.82
7.3.80.0000.01414.72
7.3.70.0090.00914.77
7.3.60.0070.01014.83
7.3.50.0040.00714.72
7.3.40.0030.00714.45
7.3.30.0070.00714.68
7.3.20.0100.00716.44
7.3.10.0070.00816.56
7.3.00.0080.00816.67
7.2.330.0090.00916.59
7.2.320.0090.00816.32
7.2.310.0100.01316.64
7.2.300.0030.01616.49
7.2.290.0080.00916.25
7.2.250.0070.01314.51
7.2.240.0140.00315.10
7.2.230.0030.00914.64
7.2.220.0030.01414.77
7.2.210.0030.01615.03
7.2.200.0030.01314.96
7.2.190.0100.00314.92
7.2.180.0090.00614.81
7.2.170.0070.00714.95
7.2.130.0070.00416.73
7.2.120.0040.00416.46
7.2.110.0000.01016.53
7.2.100.0060.00616.82
7.2.90.0090.00616.46
7.2.80.0120.00016.69
7.2.70.0090.00916.87
7.2.60.0040.00616.76
7.2.50.0100.00316.66
7.2.40.0070.00716.72
7.2.30.0070.00917.33
7.2.20.0060.01117.36
7.2.10.0100.00517.39
7.2.00.0070.00917.21
7.1.330.0070.01015.54
7.1.320.0070.01015.69
7.1.310.0080.01115.42
7.1.300.0110.00315.42
7.1.290.0000.00915.49
7.1.280.0040.01115.70
7.1.270.0060.01315.65
7.1.260.0120.00315.45
7.1.250.0110.00615.42
7.1.240.0060.00615.25
7.1.230.0000.00815.34
7.1.220.0040.00815.43
7.1.210.0070.00715.59
7.1.200.0050.00715.60
7.1.190.0070.00315.47
7.1.180.0000.01215.53
7.1.170.0060.00315.39
7.1.160.0070.00715.63
7.1.150.0070.00616.02
7.1.140.0060.00916.18
7.1.130.0040.01016.05
7.1.120.0070.00716.28
7.1.110.0100.00615.77
7.1.100.0090.00515.82
7.1.90.0060.01015.63
7.1.80.0070.00815.86
7.1.70.0040.00915.42
7.1.60.0130.00924.31
7.1.50.0180.01124.14
7.1.40.0150.01524.00
7.1.30.0200.00924.05
7.1.20.0170.01424.11
7.1.10.0110.00815.20
7.1.00.0050.00915.13
7.0.330.0100.00315.32
5.6.380.0030.00714.47

preferences:
85.2 ms | 400 KiB | 5 Q