3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass{ public function one(){ return 'sth'; } public function two(){ function myfunc($arg){ if ($arg){ $newobj = new myclass(); return $newobj->one(); } else { return 'nothing'; } } return myfunc(TRUE); } } $obj = new myclass; echo $obj->two();

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.5.10.0140.00316.51
8.5.00.0090.01219.93
8.4.150.0020.00014.05
8.4.140.0080.01217.45
8.4.130.0150.00618.04
8.4.120.0090.00720.70
8.4.110.0120.00822.52
8.4.100.0100.01017.82
8.4.90.0130.00818.65
8.4.80.0100.01017.68
8.4.70.0090.01117.71
8.4.60.0110.01018.76
8.4.50.0050.00317.96
8.4.40.0130.00624.13
8.4.30.0100.01019.36
8.4.20.0040.01217.84
8.4.10.0040.00419.65
8.3.280.0150.00518.31
8.3.270.0090.01216.62
8.3.260.0110.00916.64
8.3.250.0130.00618.96
8.3.240.0080.00816.63
8.3.230.0090.01016.63
8.3.220.0110.00718.89
8.3.210.0100.00816.53
8.3.200.0030.00516.54
8.3.190.0050.00216.63
8.3.180.0110.00818.13
8.3.170.0070.01116.63
8.3.160.0180.00018.31
8.3.150.0070.01117.05
8.3.140.0090.00617.27
8.3.130.0030.00518.34
8.3.120.0090.00020.64
8.3.110.0120.00320.94
8.3.100.0060.00316.63
8.3.90.0040.00426.77
8.3.80.0090.00016.63
8.3.70.0120.00618.31
8.3.60.0040.01116.63
8.3.50.0130.00417.34
8.3.40.0040.01118.89
8.3.30.0150.00018.46
8.3.20.0040.00420.22
8.3.10.0080.00021.91
8.3.00.0040.00419.13
8.2.290.0110.00820.36
8.2.280.0070.00418.23
8.2.270.0040.01516.32
8.2.260.0100.01016.49
8.2.250.0120.00416.61
8.2.240.0060.01217.13
8.2.230.0030.00622.58
8.2.220.0060.00324.06
8.2.210.0090.00026.77
8.2.200.0030.00616.63
8.2.190.0140.00716.58
8.2.180.0070.00716.38
8.2.170.0040.01122.96
8.2.160.0070.00720.52
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.21
8.2.110.0060.00322.30
8.2.100.0030.00917.78
8.2.90.0060.00317.50
8.2.80.0090.00018.66
8.2.70.0040.00417.61
8.2.60.0050.00317.63
8.2.50.0000.00817.63
8.2.40.0060.00318.04
8.2.30.0080.00017.74
8.2.20.0040.00417.93
8.2.10.0070.00018.05
8.2.00.0020.00517.94
8.1.330.0120.00722.03
8.1.320.0120.00816.17
8.1.310.0000.01416.86
8.1.300.0050.00318.43
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0040.00422.14
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.71
8.1.230.0110.00018.97
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0000.00818.82
8.1.150.0040.00418.91
8.1.140.0030.00322.13
8.1.130.0000.00718.79
8.1.120.0060.00317.47
8.1.110.0050.00217.38
8.1.100.0040.00417.45
8.1.90.0000.00817.34
8.1.80.0040.00417.38
8.1.70.0000.00717.46
8.1.60.0080.00017.57
8.1.50.0080.00017.53
8.1.40.0070.00017.58
8.1.30.0040.00417.53
8.1.20.0020.00517.59
8.1.10.0040.00417.54
8.1.00.0000.00717.50
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0000.00718.00
8.0.270.0050.00218.06
8.0.260.0060.00316.72
8.0.250.0000.00716.98
8.0.240.0040.00516.94
8.0.230.0000.00817.01
8.0.220.0000.00716.90
8.0.210.0030.00316.84
8.0.200.0030.00317.00
8.0.190.0030.00616.84
8.0.180.0040.00416.88
8.0.170.0040.00416.94
8.0.160.0000.00816.78
8.0.150.0000.00816.74
8.0.140.0000.00716.84
8.0.130.0000.00513.25
8.0.120.0030.00516.86
8.0.110.0000.00716.88
8.0.100.0000.00716.91
8.0.90.0040.00416.78
8.0.80.0120.00416.88
8.0.70.0040.00416.95
8.0.60.0070.00016.68
8.0.50.0000.00716.87
8.0.30.0130.00417.03
8.0.20.0130.00717.41
8.0.10.0080.00016.82
8.0.00.0070.01016.59
7.4.330.0000.00615.55
7.4.320.0030.00316.60
7.4.300.0000.00716.55
7.4.290.0000.00916.50
7.4.280.0000.00816.63
7.4.270.0020.00516.49
7.4.260.0000.00716.62
7.4.250.0060.00316.45
7.4.240.0030.00516.59
7.4.230.0070.00016.48
7.4.220.0110.00916.61
7.4.210.0100.00716.62
7.4.200.0070.00016.49
7.4.160.0140.00216.53
7.4.150.0070.01117.40
7.4.140.0040.01417.86
7.4.130.0110.00616.32
7.4.120.0090.01016.56
7.4.110.0070.01416.61
7.4.100.0100.00716.61
7.4.90.0060.01016.47
7.4.80.0120.00619.39
7.4.70.0060.01216.42
7.4.60.0100.01016.39
7.4.50.0030.00816.46
7.4.40.0070.01016.59
7.4.30.0060.01016.29
7.4.00.0060.01014.91
7.3.330.0060.00013.24
7.3.320.0000.00513.33
7.3.310.0070.00016.35
7.3.300.0070.00016.32
7.3.290.0000.00716.22
7.3.280.0090.00716.33
7.3.270.0030.01517.40
7.3.260.0080.01316.41
7.3.250.0100.00816.37
7.3.240.0160.00316.35
7.3.230.0150.00316.59
7.3.210.0150.00416.31
7.3.200.0140.00816.40
7.3.190.0130.00316.38
7.3.180.0050.01216.38
7.3.170.0110.01116.29
7.3.160.0150.00316.43
7.3.120.0070.01014.98
7.3.110.0090.00914.91
7.3.100.0070.01414.72
7.3.90.0000.01114.57
7.3.80.0090.00614.76
7.3.70.0070.00714.93
7.3.60.0030.01014.83
7.3.50.0070.00414.79
7.3.40.0140.00014.68
7.3.30.0060.00614.54
7.3.20.0080.00816.64
7.3.10.0060.00316.79
7.3.00.0000.00916.49
7.2.330.0060.01216.65
7.2.320.0090.01216.74
7.2.310.0130.01016.66
7.2.300.0120.00916.65
7.2.290.0120.00416.50
7.2.250.0000.02014.93
7.2.240.0060.01314.90
7.2.230.0040.01115.18
7.2.220.0040.01114.87
7.2.210.0090.00614.63
7.2.200.0060.00614.99
7.2.190.0170.00015.01
7.2.180.0100.00015.01
7.2.170.0040.01114.98
7.2.160.0030.00814.95
7.2.150.0040.01116.96
7.2.140.0040.01116.89
7.2.130.0050.00517.00
7.2.120.0000.01016.97
7.2.110.0060.00916.79
7.2.100.0030.00916.75
7.2.90.0060.01016.62
7.2.80.0090.00616.88
7.2.70.0090.00316.77
7.2.60.0050.01316.74
7.2.50.0070.01016.95
7.2.40.0040.01216.88
7.2.30.0080.00416.93
7.2.20.0030.01016.82
7.2.10.0080.00816.62
7.2.00.0060.00617.87
7.1.330.0140.00315.51
7.1.320.0000.01715.86
7.1.310.0070.01015.76
7.1.300.0000.01015.72
7.1.290.0070.01015.82
7.1.280.0060.00615.72
7.1.270.0000.01415.38
7.1.260.0070.00715.98
7.1.250.0030.00715.63
7.1.240.0000.01415.71
7.1.230.0100.00315.70
7.1.220.0080.00815.63
7.1.210.0060.00315.83
7.1.200.0090.00715.73
7.1.190.0060.00615.73
7.1.180.0030.01315.45
7.1.170.0120.00015.57
7.1.160.0060.00615.72
7.1.150.0060.00615.68
7.1.140.0060.00615.84
7.1.130.0060.01015.75
7.1.120.0050.00515.77
7.1.110.0090.00315.75
7.1.100.0070.00716.96
7.1.90.0030.01015.63
7.1.80.0060.01015.78
7.1.70.0050.00516.45
7.1.60.0020.00916.31
7.1.50.0020.00916.28
7.1.40.0000.01216.04
7.1.30.0090.00416.30
7.1.20.0050.01016.21
7.1.10.0020.00916.05
7.1.00.0040.01316.28
7.0.330.0030.01215.27
7.0.320.0070.01015.48
7.0.310.0080.00815.27
7.0.300.0100.00715.24
7.0.290.0060.00615.34
7.0.280.0080.00315.17
7.0.270.0040.00415.24
7.0.260.0030.00615.31
7.0.250.0030.00715.17
7.0.240.0100.00615.16
7.0.230.0120.00315.31
7.0.220.0030.00615.41
7.0.210.0030.00715.30
7.0.200.0050.00515.96
7.0.190.0040.00715.96
7.0.180.0060.00515.72
7.0.170.0060.00615.81
7.0.160.0010.00915.80
7.0.150.0020.01015.73
7.0.140.0040.00815.88
7.0.130.0060.01015.85
7.0.120.0080.00815.94
7.0.110.0070.00615.82
7.0.100.0070.00515.80
7.0.90.0030.00815.97
7.0.80.0050.00815.80
7.0.70.0050.00815.78
7.0.60.0020.00715.63
7.0.50.0000.01315.76
7.0.40.0040.00714.54
7.0.30.0030.00914.58
7.0.20.0050.00614.65
7.0.10.0000.01214.48
7.0.00.0060.00814.55
5.6.400.0070.00714.40
5.6.390.0060.01014.47
5.6.380.0060.00914.39
5.6.370.0030.00714.58
5.6.360.0040.00714.05
5.6.350.0040.00814.36
5.6.340.0060.01014.08
5.6.330.0030.00714.11
5.6.320.0100.00314.36
5.6.310.0100.00013.90
5.6.300.0040.01114.33
5.6.290.0070.00414.11
5.6.280.0090.00914.22
5.6.270.0000.01514.29
5.6.260.0090.00314.42
5.6.250.0000.00914.02
5.6.240.0060.00914.57
5.6.230.0040.00714.42
5.6.220.0030.01314.59
5.6.210.0090.00614.18
5.6.200.0070.00714.27
5.6.190.0130.00014.50
5.6.180.0030.01414.45
5.6.170.0090.00614.33
5.6.160.0030.00614.00
5.6.150.0080.00313.94
5.6.140.0040.01214.39
5.6.130.0110.00614.31
5.6.120.0130.00314.38
5.6.110.0030.01314.29
5.6.100.0030.01314.17
5.6.90.0110.00314.24
5.6.80.0000.01314.11
5.6.70.0070.01014.30
5.6.60.0030.01014.27
5.6.50.0090.00613.95
5.6.40.0060.00914.43
5.6.30.0070.00714.39
5.6.20.0070.00714.08
5.6.10.0060.00914.15
5.6.00.0070.01014.16

preferences:
161.63 ms | 403 KiB | 5 Q