3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Human { private $alive = TRUE; private $name; public function __construct($name = NULL) { $this->name = $name ?: 'Person'; } public function is_alive() { return $this->alive; } public function kill() { if($this->alive) { $this->alive = FALSE; } else { throw new Exception($this->name.' is already dead'); } } } $npc = new Human('John'); if($npc->is_alive()) echo 'John is alive'; $npc->kill(); if( ! $npc->is_alive()) echo 'John isn\'t live anymore';

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.01016.75
8.3.50.0130.00722.01
8.3.40.0110.01118.84
8.3.30.0000.01419.13
8.3.20.0020.00520.13
8.3.10.0040.00423.56
8.3.00.0050.00319.50
8.2.180.0040.01116.63
8.2.170.0090.01322.96
8.2.160.0100.00720.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00422.27
8.2.110.0090.00022.07
8.2.100.0080.00317.91
8.2.90.0000.00719.22
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0060.00317.93
8.2.50.0050.00318.07
8.2.40.0040.00418.09
8.2.30.0040.00718.13
8.2.20.0070.00317.66
8.2.10.0000.00718.06
8.2.00.0030.00517.75
8.1.280.0090.00625.92
8.1.270.0110.00722.19
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.01024.04
8.1.230.0070.00319.03
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00817.48
8.1.190.0040.00417.52
8.1.180.0040.00418.10
8.1.170.0040.00418.60
8.1.160.0070.00021.99
8.1.150.0040.00418.52
8.1.140.0040.00417.33
8.1.130.0030.00317.76
8.1.120.0040.00417.51
8.1.110.0040.00417.52
8.1.100.0040.00417.50
8.1.90.0000.00717.37
8.1.80.0030.00317.48
8.1.70.0030.00317.36
8.1.60.0050.00517.60
8.1.50.0030.00517.47
8.1.40.0040.00417.52
8.1.30.0080.00017.45
8.1.20.0040.00417.66
8.1.10.0000.00817.59
8.1.00.0080.00017.43
8.0.300.0000.00718.77
8.0.290.0050.00217.05
8.0.280.0070.00018.34
8.0.270.0000.00817.21
8.0.260.0030.00316.86
8.0.250.0070.00016.84
8.0.240.0000.00716.83
8.0.230.0070.00016.91
8.0.220.0030.00316.93
8.0.210.0030.00316.78
8.0.200.0060.00016.84
8.0.190.0000.00716.85
8.0.180.0040.00416.90
8.0.170.0030.00516.88
8.0.160.0000.00716.95
8.0.150.0030.00316.86
8.0.140.0000.00816.75
8.0.130.0000.00613.41
8.0.120.0080.00016.73
8.0.110.0070.00016.78
8.0.100.0000.00716.95
8.0.90.0040.00416.96
8.0.80.0040.01116.89
8.0.70.0000.00716.85
8.0.60.0000.00716.84
8.0.50.0040.00416.90
8.0.30.0130.01016.79
8.0.20.0090.00917.40
8.0.10.0050.00317.01
8.0.00.0110.01016.68
7.4.330.0030.00315.09
7.4.320.0030.00316.60
7.4.300.0030.00316.65
7.4.290.0040.00416.52
7.4.280.0000.00716.40
7.4.270.0000.00816.61
7.4.260.0080.00016.41
7.4.250.0030.00316.37
7.4.240.0030.00416.63
7.4.230.0000.00716.64
7.4.220.0070.01016.55
7.4.210.0070.01116.59
7.4.200.0000.00716.61
7.4.190.0070.00016.70
7.4.160.0170.00616.50
7.4.150.0060.01017.40
7.4.140.0080.01217.86
7.4.130.0090.01016.49
7.4.120.0120.00716.46
7.4.110.0120.01216.51
7.4.100.0070.01016.68
7.4.90.0030.01516.48
7.4.80.0060.01219.39
7.4.70.0030.01216.51
7.4.60.0030.01316.56
7.4.50.0030.00316.28
7.4.40.0060.00922.77
7.4.30.0110.00416.55
7.4.00.0090.00714.97
7.3.330.0050.00013.27
7.3.320.0050.00013.13
7.3.310.0030.00316.47
7.3.300.0070.00016.25
7.3.290.0030.01016.38
7.3.280.0130.00716.41
7.3.270.0090.00917.40
7.3.260.0160.00316.52
7.3.250.0120.00816.29
7.3.240.0160.00716.61
7.3.230.0120.00516.50
7.3.210.0080.00816.48
7.3.200.0130.00619.39
7.3.190.0130.01016.32
7.3.180.0040.01116.39
7.3.170.0130.00316.38
7.3.160.0030.01316.27
7.3.120.0060.00914.95
7.3.110.0000.01715.04
7.3.100.0040.01114.98
7.3.90.0080.00814.96
7.3.80.0000.01014.50
7.3.70.0040.00714.86
7.3.60.0070.01014.63
7.3.50.0100.00314.52
7.3.40.0120.00014.63
7.3.30.0040.01114.85
7.3.20.0030.01016.70
7.3.10.0130.00916.45
7.3.00.0090.00916.39
7.2.330.0070.01016.73
7.2.320.0130.00316.47
7.2.310.0120.00316.81
7.2.300.0070.01116.79
7.2.290.0160.00716.54
7.2.250.0040.01415.30
7.2.240.0120.00615.26
7.2.230.0100.00715.18
7.2.220.0070.00715.27
7.2.210.0000.01215.26
7.2.200.0120.00015.05
7.2.190.0090.00615.08
7.2.180.0080.00514.89
7.2.170.0100.00315.19
7.2.160.0000.01314.95
7.2.150.0080.00416.96
7.2.140.0060.00616.96
7.2.130.0070.00916.90
7.2.120.0100.00416.91
7.2.110.0090.01016.94
7.2.100.0060.01016.90
7.2.90.0140.00816.99
7.2.80.0140.00816.89
7.2.70.0120.00916.74
7.2.60.0090.01016.99
7.2.50.0150.01216.68
7.2.40.0160.00416.81
7.2.30.0090.01016.87
7.2.20.0060.01016.71
7.2.10.0090.00716.94
7.2.00.0090.00817.67
7.1.330.0000.01715.71
7.1.320.0070.00715.79
7.1.310.0040.00815.82
7.1.300.0000.01615.80
7.1.290.0070.00715.93
7.1.280.0060.00915.53
7.1.270.0070.01015.72
7.1.260.0060.00615.75
7.1.250.0070.00915.52
7.1.240.0000.01315.60
7.1.230.0080.00815.72
7.1.220.0060.00615.72
7.1.210.0000.01015.65
7.1.200.0040.01115.77
7.1.190.0080.00015.82
7.1.180.0030.00615.51
7.1.170.0100.00315.84
7.1.160.0110.00415.85
7.1.150.0060.00615.70
7.1.140.0070.00415.65
7.1.130.0080.00815.66
7.1.120.0070.00715.69
7.1.110.0060.00615.86
7.1.100.0080.00716.83
7.1.90.0070.00715.85
7.1.80.0030.00615.72
7.1.70.0020.00816.41
7.1.60.0080.01016.31
7.1.50.0050.01316.41
7.1.40.0040.00815.82
7.1.30.0030.01015.47
7.1.20.0030.00915.62
7.1.10.0000.01415.62
7.1.00.0070.03919.08
7.0.330.0090.00315.16
7.0.320.0060.00315.39
7.0.310.0030.01015.21
7.0.300.0070.00315.47
7.0.290.0080.00615.35
7.0.280.0030.00915.36
7.0.270.0090.00315.16
7.0.260.0030.00915.33
7.0.250.0100.00315.39
7.0.240.0090.00615.13
7.0.230.0100.00715.34
7.0.220.0040.00415.46
7.0.210.0040.00415.53
7.0.200.0080.00616.22
7.0.190.0070.00715.45
7.0.180.0060.00615.48
7.0.170.0030.00615.40
7.0.160.0040.00815.39
7.0.150.0030.01015.50
7.0.140.0020.04218.74
7.0.130.0000.01315.58
7.0.120.0090.00315.54
7.0.110.0100.00615.45
7.0.100.0060.03017.68
7.0.90.0110.02817.67
7.0.80.0140.03417.56
7.0.70.0120.02817.61
7.0.60.0230.04017.61
7.0.50.0100.02417.91
7.0.40.0050.03516.78
7.0.30.0040.02616.69
7.0.20.0020.02916.69
7.0.10.0080.02016.81
7.0.00.0060.02516.73
5.6.400.0000.00813.92
5.6.390.0090.00314.66
5.6.380.0130.00014.68
5.6.370.0060.00614.70
5.6.360.0060.00614.40
5.6.350.0090.00614.29
5.6.340.0090.00614.31
5.6.330.0120.00314.52
5.6.320.0070.00414.22
5.6.310.0030.01014.43
5.6.300.0110.00314.43
5.6.290.0070.00414.25
5.6.280.0060.03917.90
5.6.270.0070.00714.50
5.6.260.0100.00314.24
5.6.250.0050.02817.48
5.6.240.0070.02517.47
5.6.230.0000.03417.59
5.6.220.0050.03117.57
5.6.210.0020.02717.37
5.6.200.0040.02717.68
5.6.190.0060.02617.88
5.6.180.0110.02017.72
5.6.170.0020.02817.70
5.6.160.0090.02117.79
5.6.150.0060.03917.66
5.6.140.0110.03517.71
5.6.130.0110.02317.65
5.6.120.0040.02217.67
5.6.110.0000.02917.73
5.6.100.0020.02917.66
5.6.90.0100.03517.67
5.6.80.0060.02117.29
5.6.70.0090.04117.34
5.6.60.0120.03917.41
5.6.50.0100.03617.33
5.6.40.0110.03517.37
5.6.30.0150.04117.48
5.6.20.0020.04917.39
5.6.10.0110.03217.27
5.6.00.0070.04517.42
5.5.380.0060.02517.46
5.5.370.0070.02117.26
5.5.360.0030.02617.17
5.5.350.0020.02717.41
5.5.340.0050.02817.53
5.5.330.0020.02917.56
5.5.320.0050.02617.58
5.5.310.0060.03317.68
5.5.300.0060.02317.63
5.5.290.0050.04817.50
5.5.280.0080.02517.46
5.5.270.0050.02317.79
5.5.260.0080.02317.56
5.5.250.0030.02617.37
5.5.240.0050.02617.35
5.5.230.0060.04617.12
5.5.220.0070.04417.31
5.5.210.0100.03817.17
5.5.200.0080.04317.13
5.5.190.0080.04317.12
5.5.180.0030.03617.26
5.5.170.0110.00414.14
5.5.160.0070.03217.21
5.5.150.0030.04617.18
5.5.140.0040.04417.13
5.5.130.0090.03716.96
5.5.120.0100.04117.22
5.5.110.0080.03317.14
5.5.100.0070.03617.23
5.5.90.0050.04316.94
5.5.80.0130.03717.21
5.5.70.0100.03917.07
5.5.60.0080.04317.09
5.5.50.0070.03917.21
5.5.40.0140.03517.08
5.5.30.0020.03017.16
5.5.20.0120.03717.19
5.5.10.0080.04517.21
5.5.00.0050.04517.20
5.4.450.0050.02515.36
5.4.440.0010.02615.48
5.4.430.0030.02315.43
5.4.420.0020.03815.43
5.4.410.0020.03015.28
5.4.400.0030.04215.20
5.4.390.0050.03915.23
5.4.380.0070.02215.32
5.4.370.0050.03715.27
5.4.360.0100.03515.21
5.4.350.0070.03915.36
5.4.340.0070.03815.32
5.4.330.0000.00611.51
5.4.320.0110.03215.35
5.4.310.0050.02615.32
5.4.300.0030.02715.24
5.4.290.0070.04115.32
5.4.280.0070.03915.27
5.4.270.0070.02515.29
5.4.260.0020.04415.28
5.4.250.0060.03815.23
5.4.240.0080.04015.34
5.4.230.0050.03815.32
5.4.220.0080.03815.27
5.4.210.0060.02515.19
5.4.200.0050.04415.16
5.4.190.0050.03915.29
5.4.180.0050.02515.32
5.4.170.0050.04415.36
5.4.160.0040.04415.22
5.4.150.0150.03515.22
5.4.140.0060.04013.85
5.4.130.0030.03514.00
5.4.120.0010.03313.93
5.4.110.0050.03213.95
5.4.100.0090.03713.99
5.4.90.0100.03313.96
5.4.80.0050.03213.96
5.4.70.0070.03713.92
5.4.60.0020.04213.94
5.4.50.0030.04013.92
5.4.40.0070.03813.99
5.4.30.0070.03413.95
5.4.20.0050.04113.94
5.4.10.0090.03513.96
5.4.00.0080.03213.68
5.3.290.0080.03313.12
5.3.280.0050.03713.07
5.3.270.0020.02613.10
5.3.260.0080.03713.06
5.3.250.0110.03213.08
5.3.240.0080.03313.12
5.3.230.0110.03313.09
5.3.220.0110.03213.06
5.3.210.0080.03713.09
5.3.200.0080.03513.01
5.3.190.0040.04013.02
5.3.180.0040.03813.02
5.3.170.0050.03713.01
5.3.160.0090.03113.05
5.3.150.0050.04013.04
5.3.140.0010.02513.00
5.3.130.0070.02913.03
5.3.120.0080.03813.09
5.3.110.0070.03713.10
5.3.100.0070.03712.78
5.3.90.0100.03312.76
5.3.80.0070.03712.77
5.3.70.0050.03712.80
5.3.60.0100.03612.77
5.3.50.0070.03812.80
5.3.40.0120.03212.70
5.3.30.0080.03612.67
5.3.20.0090.03912.57
5.3.10.0040.03712.58
5.3.00.0030.04312.57
5.2.170.0100.05712.43
5.2.160.0070.05712.43
5.2.150.0030.06312.43
5.2.140.0100.05312.43
5.2.130.0030.04312.43
5.2.120.0100.05712.43
5.2.110.0070.06012.43
5.2.100.0030.03312.43
5.2.90.0070.05712.43
5.2.80.0070.06012.43
5.2.70.0070.05712.43
5.2.60.0070.03712.43
5.2.50.0030.06312.43
5.2.40.0000.06712.43
5.2.30.0030.05312.43
5.2.20.0070.04312.43
5.2.10.0070.05312.43
5.2.00.0070.06012.43
5.1.60.0000.05312.43
5.1.50.0000.03712.43
5.1.40.0100.04712.43
5.1.30.0130.05312.43
5.1.20.0030.04312.43
5.1.10.0000.05712.43
5.1.00.0030.05312.43
5.0.50.0070.04312.43
5.0.40.0030.04312.43
5.0.30.0030.05712.43
5.0.20.0030.03312.43
5.0.10.0000.04312.43
5.0.00.0070.06312.43
4.4.90.0070.03012.43
4.4.80.0070.03012.43
4.4.70.0100.03012.43
4.4.60.0030.03312.43
4.4.50.0000.02712.43
4.4.40.0070.05012.43
4.4.30.0100.02712.43
4.4.20.0030.02312.43
4.4.10.0030.03312.43
4.4.00.0030.04712.43
4.3.110.0000.03712.43
4.3.100.0000.02012.43
4.3.90.0030.03312.43
4.3.80.0070.05012.43
4.3.70.0030.03312.43
4.3.60.0000.03712.43
4.3.50.0000.03312.43
4.3.40.0030.05312.43
4.3.30.0000.03312.43
4.3.20.0000.03312.43
4.3.10.0000.03312.43
4.3.00.0030.03312.43

preferences:
40.1 ms | 401 KiB | 5 Q