3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Invokable { private $callCount = 0; public function __invoke() { $this->callCount++; return $this->callCount; } } class Example { private $invokable; public function __construct() { $this->invokable = new Invokable(); } public function getInvokable0() { $invokable = $this->invokable; return $invokable(); } public function getInvokable1() { return ($this->invokable)(); } public function getInvokable2() { return $this->invokable(); } } $eg = new Example(); printf("%d\n",$eg->getInvokable0()); printf("%d\n",$eg->getInvokable1()); printf("%d\n",$eg->getInvokable2());

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.0120.00617.00
8.3.50.0120.00722.11
8.3.40.0160.00618.93
8.3.30.0030.01118.82
8.3.20.0080.00020.28
8.3.10.0000.00722.10
8.3.00.0000.00923.65
8.2.180.0070.01418.29
8.2.170.0070.00722.96
8.2.160.0130.00020.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00620.32
8.2.120.0080.00026.35
8.2.110.0080.00319.45
8.2.100.0120.00018.03
8.2.90.0040.00419.38
8.2.80.0080.00019.17
8.2.70.0040.00417.59
8.2.60.0060.00317.80
8.2.50.0070.00318.10
8.2.40.0000.00720.47
8.2.30.0070.00019.13
8.2.20.0040.00417.95
8.2.10.0040.00417.95
8.2.00.0000.00718.18
8.1.280.0040.01125.92
8.1.270.0000.00821.96
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0040.00422.02
8.1.230.0030.00920.89
8.1.220.0100.00017.76
8.1.210.0030.00518.85
8.1.200.0100.00017.35
8.1.190.0000.00917.00
8.1.180.0000.00818.10
8.1.170.0040.00418.62
8.1.160.0000.00818.83
8.1.150.0040.00420.19
8.1.140.0090.00019.58
8.1.130.0030.00318.90
8.1.120.0040.00417.42
8.1.110.0040.00417.41
8.1.100.0040.00417.36
8.1.90.0090.00017.42
8.1.80.0000.00717.42
8.1.70.0060.00317.41
8.1.60.0040.00417.63
8.1.50.0040.00417.58
8.1.40.0060.00317.38
8.1.30.0000.00717.64
8.1.20.0080.00017.55
8.1.10.0000.00717.61
8.1.00.0040.00417.48
8.0.300.0030.00320.17
8.0.290.0050.00316.75
8.0.280.0000.00818.26
8.0.270.0000.00717.21
8.0.260.0060.00317.14
8.0.250.0000.00616.96
8.0.240.0000.00816.88
8.0.230.0110.00016.88
8.0.220.0030.00416.78
8.0.210.0070.00016.79
8.0.200.0000.00616.94
8.0.190.0070.00016.98
8.0.180.0000.00716.91
8.0.170.0040.00416.83
8.0.160.0040.00416.95
8.0.150.0000.00716.86
8.0.140.0040.00416.76
8.0.130.0000.00613.34
8.0.120.0040.00416.88
8.0.110.0040.00416.93
8.0.100.0090.00016.82
8.0.90.0040.00416.73
8.0.80.0060.01516.96
8.0.70.0040.00416.92
8.0.60.0000.00716.81
8.0.50.0000.00716.71
8.0.30.0080.01117.15
8.0.20.0110.00917.40
8.0.10.0030.00516.86
8.0.00.0090.00916.91
7.4.330.0070.00015.55
7.4.320.0000.00716.37
7.4.300.0000.00616.52
7.4.290.0040.00416.53
7.4.280.0040.00416.60
7.4.270.0000.00716.63
7.4.260.0000.00716.52
7.4.250.0070.00016.48
7.4.240.0040.00416.60
7.4.230.0040.00416.64
7.4.220.0140.00716.56
7.4.210.0090.00916.48
7.4.200.0030.00316.39
7.4.160.0080.00816.47
7.4.150.0170.00317.40
7.4.140.0140.00717.86
7.4.130.0110.01016.54
7.4.120.0120.00916.59
7.4.110.0070.01016.65
7.4.100.0060.01216.50
7.4.90.0060.01216.40
7.4.80.0090.00819.39
7.4.70.0130.00316.45
7.4.60.0040.01216.57
7.4.50.0030.01016.67
7.4.40.0030.01316.36
7.4.30.0140.00316.55
7.4.00.0070.01115.10
7.3.330.0030.00313.33
7.3.320.0000.00513.22
7.3.310.0030.00316.32
7.3.300.0070.00016.23
7.3.290.0030.01116.37
7.3.280.0060.01016.38
7.3.270.0100.00717.40
7.3.260.0100.01016.37
7.3.250.0080.01016.40
7.3.240.0070.00916.55
7.3.230.0140.00416.58
7.3.210.0120.00416.36
7.3.200.0080.00816.60
7.3.190.0120.00416.45
7.3.180.0110.00516.66
7.3.170.0120.00416.21
7.3.160.0080.00916.20
7.3.120.0080.01114.65
7.3.110.0090.00814.73
7.3.100.0080.01014.85
7.3.90.0030.01214.82
7.3.80.0050.01014.84
7.3.70.0060.00614.84
7.3.60.0060.00814.77
7.3.50.0030.01014.81
7.3.40.0070.01014.70
7.3.30.0070.00914.58
7.3.20.0020.01116.68
7.3.10.0020.01216.43
7.3.00.0050.00916.65
7.2.330.0090.01216.60
7.2.320.0090.00916.76
7.2.310.0070.01016.77
7.2.300.0090.01316.50
7.2.290.0090.00916.72
7.2.250.0120.00715.11
7.2.240.0080.01015.16
7.2.230.0050.01214.88
7.2.220.0050.01014.85
7.2.210.0060.00515.00
7.2.200.0040.00815.00
7.2.190.0060.00814.77
7.2.180.0040.00915.06
7.2.170.0060.00914.75
7.2.160.0030.01314.87
7.2.150.0060.00616.75
7.2.140.0000.00916.77
7.2.130.0080.00416.88
7.2.120.0030.00916.65
7.2.110.0050.00816.59
7.2.100.0080.00516.94
7.2.90.0100.00616.78
7.2.80.0120.00616.76
7.2.70.0050.00716.55
7.2.60.0070.00716.80
7.2.50.0030.01016.67
7.2.40.0070.00616.86
7.2.30.0050.00616.94
7.2.20.0090.00516.67
7.2.10.0080.00516.72
7.2.00.0080.00517.75
7.1.330.0080.00515.53
7.1.320.0040.01215.80
7.1.310.0060.00915.78
7.1.300.0070.00415.74
7.1.290.0070.00715.63
7.1.280.0070.00915.61
7.1.270.0040.00715.69
7.1.260.0050.00715.59
7.1.250.0050.00615.40
7.1.240.0050.00515.63
7.1.230.0050.00715.69
7.1.220.0050.00715.52
7.1.210.0000.01415.46
7.1.200.0040.01115.63
7.1.190.0090.00515.59
7.1.180.0050.00815.70
7.1.170.0050.01015.64
7.1.160.0050.00515.71
7.1.150.0020.01015.62
7.1.140.0090.00515.71
7.1.130.0080.00515.61
7.1.120.0050.00815.57
7.1.110.0090.00515.68
7.1.100.0050.00716.46
7.1.90.0050.00915.48
7.1.80.0080.00515.60
7.1.70.0050.00716.05
7.1.60.0060.00716.18
7.1.50.0100.00715.98
7.1.40.0020.01315.71
7.1.30.0160.02522.47
7.1.20.0970.03322.52
7.1.10.3620.02817.10
7.1.00.0110.02817.17
7.0.330.0040.00615.17
7.0.320.0060.00515.43
7.0.310.0040.00915.30
7.0.300.0050.00815.38
7.0.290.0050.01015.37
7.0.280.0050.00715.15
7.0.270.0050.00815.30
7.0.260.0050.01015.23
7.0.250.0080.00515.14
7.0.240.0090.00215.27
7.0.230.0030.01115.39
7.0.220.0050.01015.36
7.0.210.0020.01015.21
7.0.200.0040.01015.84
7.0.190.0030.00915.19
7.0.180.0050.00515.19
7.0.170.3400.02816.83
7.0.160.0120.02516.86
7.0.150.0100.02416.73
7.0.140.0160.03016.87
7.0.130.0130.02816.89
7.0.120.0060.03216.82
7.0.110.0160.02716.82
7.0.100.0080.03516.80
7.0.90.1900.03316.72
7.0.80.0100.02616.89
7.0.70.1770.02516.73
7.0.60.0060.02816.83
7.0.50.1680.03417.10
7.0.40.1880.02715.52
7.0.30.1440.02315.64
7.0.20.1460.02815.65
7.0.10.1230.02615.57
7.0.00.1370.02215.57
5.6.400.0060.00614.08
5.6.390.0100.00614.09
5.6.380.0050.00814.11
5.6.370.0040.00814.20
5.6.360.0090.00614.05
5.6.350.0040.00714.10
5.6.340.0040.00714.38
5.6.330.0030.01014.13
5.6.320.0000.01314.07
5.6.310.0030.01414.00
5.6.300.0040.00714.02
5.6.290.0060.00613.75
5.6.280.0030.01414.04
5.6.270.0030.01014.08
5.6.260.0000.01714.13
5.6.250.0030.00814.25
5.6.240.0150.00014.25
5.6.230.0030.01213.84
5.6.220.0030.00914.05
5.6.210.0110.00413.96
5.6.200.0000.00914.14
5.6.190.0000.01513.98
5.6.180.0090.00913.93
5.6.170.0130.00314.13
5.6.160.0040.01214.00
5.6.150.0000.00913.83
5.6.140.0000.01314.03
5.6.130.0040.00813.98
5.6.120.0030.00913.88
5.6.110.0060.00614.00
5.6.100.0040.00814.00
5.6.90.0070.00313.84
5.6.80.0030.00914.16
5.6.70.0030.01413.87
5.6.60.0060.00613.94
5.6.50.0090.00014.14
5.6.40.0120.00313.91
5.6.30.0030.00914.07
5.6.20.0040.00714.20
5.6.10.0070.00813.94
5.6.00.0090.00313.80

preferences:
48.13 ms | 401 KiB | 5 Q