3v4l.org

run code in 300+ PHP versions simultaneously
<?php class World { static $id = 0; protected $uid; protected $worldName; const type = 'world'; public function __construct( $worldName ) { $this->setUID(); $this->wrldName = $worldName; } private function setUID() { $this->uid = self::$id++; } public function whoIsPerson( Person $person ) { $personUID = $person->getUID(); if( $personUID === 0 && $this->worldName === 'Rapture' ) return 'Jack'; elseif( $personUID === 0 && $this->worldName === 'Columbia' ) return 'Elizabeth'; else return 'Unknown Person'; } } class Person { static $id = 0; protected $uid; private function setUID() { $this->uid = self::$id++; } public function getUID() { return $this->uid; } } $person1 = new Person(); $world1 = new World('Rapture'); echo $world1->whoIsPerson( $person1 ); $world2 = new World('Columbia'); echo $world2->whoIsPerson( $person1 );

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.0070.01518.38
8.3.50.0150.00816.56
8.3.40.0120.00418.75
8.3.30.0040.01118.83
8.3.20.0060.00318.52
8.3.10.0030.00618.76
8.3.00.0080.00019.38
8.2.180.0090.00616.63
8.2.170.0070.01022.96
8.2.160.0060.00918.79
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.36
8.2.110.0050.00520.35
8.2.100.0040.00717.84
8.2.90.0040.00419.28
8.2.80.0000.00719.44
8.2.70.0040.00417.50
8.2.60.0080.00018.04
8.2.50.0030.00518.07
8.2.40.0000.00718.22
8.2.30.0030.00618.18
8.2.20.0000.00917.77
8.2.10.0030.00517.72
8.2.00.0040.00417.67
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0100.00321.95
8.1.230.0060.00920.63
8.1.220.0000.00918.77
8.1.210.0040.00419.09
8.1.200.0030.00617.25
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0000.00918.84
8.1.160.0000.00718.85
8.1.150.0070.00018.52
8.1.140.0040.00417.46
8.1.130.0000.00717.71
8.1.120.0000.00717.39
8.1.110.0000.00717.35
8.1.100.0030.00517.45
8.1.90.0000.00717.46
8.1.80.0040.00417.46
8.1.70.0080.00017.46
8.1.60.0080.00017.58
8.1.50.0070.00017.41
8.1.40.0040.00417.46
8.1.30.0050.00517.61
8.1.20.0050.00217.73
8.1.10.0040.00417.60
8.1.00.0030.00617.54
8.0.300.0000.00719.82
8.0.290.0000.00716.88
8.0.280.0000.00718.38
8.0.270.0000.00717.23
8.0.260.0070.00016.77
8.0.250.0040.00416.96
8.0.240.0040.00416.93
8.0.230.0000.00616.91
8.0.220.0000.00716.95
8.0.210.0070.00016.95
8.0.200.0030.00317.01
8.0.190.0000.00817.00
8.0.180.0060.00316.88
8.0.170.0000.00816.86
8.0.160.0040.00416.86
8.0.150.0000.00816.83
8.0.140.0080.00416.93
8.0.130.0030.00313.38
8.0.120.0040.00416.98
8.0.110.0020.00517.00
8.0.100.0030.00517.02
8.0.90.0000.00816.91
8.0.80.0080.00816.88
8.0.70.0000.00716.82
8.0.60.0050.00316.82
8.0.50.0040.00416.91
8.0.30.0130.00617.00
8.0.20.0110.00917.12
8.0.10.0000.00816.92
8.0.00.0080.01116.92
7.4.330.0050.00012.91
7.4.320.0030.00316.57
7.4.300.0040.00416.61
7.4.290.0030.00316.42
7.4.280.0040.00416.55
7.4.270.0070.00016.51
7.4.260.0000.00513.23
7.4.250.0000.00816.45
7.4.240.0000.00716.56
7.4.230.0030.00316.71
7.4.220.0100.01616.56
7.4.210.0070.00816.47
7.4.200.0030.00316.68
7.4.190.0000.00716.38
7.4.160.0090.00616.43
7.4.150.0030.01416.62
7.4.140.0110.00716.34
7.4.130.0080.00816.66
7.4.120.0100.00716.21
7.4.110.0090.00916.55
7.4.100.0100.00616.48
7.4.90.0070.01716.52
7.4.80.0140.00619.39
7.4.70.0090.00916.48
7.4.60.0150.00616.50
7.4.50.0030.00616.36
7.4.40.0070.01116.32
7.4.30.0030.01316.42
7.4.10.0000.01114.93
7.4.00.0090.00614.99
7.3.330.0040.00413.24
7.3.320.0080.00013.32
7.3.310.0050.00216.34
7.3.300.0030.00316.42
7.3.290.0080.00616.36
7.3.280.0090.00716.38
7.3.270.0060.01016.46
7.3.260.0070.01016.30
7.3.250.0090.01016.34
7.3.240.0090.00916.70
7.3.230.0130.00916.37
7.3.210.0080.01216.46
7.3.200.0000.01716.42
7.3.190.0030.01316.45
7.3.180.0090.00616.34
7.3.170.0130.00316.49
7.3.160.0070.01016.56
7.3.130.0070.01014.68
7.3.120.0050.01114.95
7.3.110.0070.01015.13
7.3.100.0040.01115.06
7.3.90.0000.01414.57
7.3.80.0060.00314.86
7.3.70.0120.00314.55
7.3.60.0070.00714.87
7.3.50.0080.00814.70
7.3.40.0080.00414.84
7.3.30.0040.01114.78
7.3.20.0030.00716.69
7.3.10.0070.00816.56
7.3.00.0120.00516.51
7.2.330.0140.00316.71
7.2.320.0070.01016.63
7.2.310.0030.02016.52
7.2.300.0090.00816.83
7.2.290.0040.01416.50
7.2.260.0080.01114.89
7.2.250.0040.01414.93
7.2.240.0040.01214.99
7.2.230.0030.01215.11
7.2.220.0000.01315.12
7.2.210.0040.01115.36
7.2.200.0070.00715.09
7.2.190.0040.00715.21
7.2.180.0030.00615.06
7.2.170.0030.01314.94
7.2.160.0090.00614.89
7.2.150.0040.00816.99
7.2.140.0070.01016.95
7.2.130.0080.00716.85
7.2.120.0090.00816.71
7.2.110.0030.00916.74
7.2.100.0090.00816.71
7.2.90.0090.00716.93
7.2.80.0060.00717.00
7.2.70.0040.00916.91
7.2.60.0050.01016.86
7.2.50.0060.00916.86
7.2.40.0080.00916.89
7.2.30.0050.01017.03
7.2.20.0070.01016.80
7.2.10.0070.00916.93
7.2.00.0100.00717.70
7.1.330.0090.00615.70
7.1.320.0070.00416.04
7.1.310.0100.00615.52
7.1.300.0070.00715.84
7.1.290.0080.00515.74
7.1.280.0120.00015.88
7.1.270.0060.00915.75
7.1.260.0040.00415.45
7.1.250.0080.00515.61
7.1.240.0030.01015.76
7.1.230.0070.00715.88
7.1.220.0070.00715.63
7.1.210.0030.00915.81
7.1.200.0030.00915.98
7.1.190.0060.00615.99
7.1.180.0000.00815.86
7.1.170.0070.00315.59
7.1.160.0000.01815.78
7.1.150.0070.01015.98
7.1.140.0100.00315.83
7.1.130.0000.01315.94
7.1.120.0060.00915.89
7.1.110.0070.00315.56
7.1.100.0060.00816.96
7.1.90.0070.00715.83
7.1.80.0070.00715.83
7.1.70.0020.00916.61
7.1.60.0080.00917.65
7.1.50.0080.00816.47
7.1.40.0000.01415.44
7.1.30.0040.00815.84
7.1.20.0030.00915.86
7.1.10.0110.00315.95
7.1.00.0030.04219.04
7.0.330.0110.00315.30
7.0.320.0030.01015.38
7.0.310.0140.00015.25
7.0.300.0090.00315.54
7.0.290.0120.00315.39
7.0.280.0040.00815.17
7.0.270.0070.00415.46
7.0.260.0040.01115.37
7.0.250.0000.00915.55
7.0.240.0070.00715.59
7.0.230.0110.00015.20
7.0.220.0040.00715.40
7.0.210.0060.00915.50
7.0.200.0070.00515.95
7.0.190.0070.00715.39
7.0.180.0080.00815.48
7.0.170.0030.01315.50
7.0.160.0000.01315.47
7.0.150.0030.00615.28
7.0.140.0000.04518.79
7.0.130.0140.00015.52
7.0.120.0090.00615.54
7.0.110.0260.02817.57
7.0.100.0400.03817.78
7.0.90.0370.04617.68
7.0.80.0360.03617.71
7.0.70.0380.04217.79
7.0.60.0290.04617.63
7.0.50.0080.02517.72
7.0.40.0080.04116.68
7.0.30.0100.03516.66
7.0.20.0030.03716.69
7.0.10.0120.03516.54
7.0.00.0090.04116.63
5.6.400.0000.01114.31
5.6.390.0000.01414.31
5.6.380.0070.00414.75
5.6.370.0120.00614.20
5.6.360.0000.01314.59
5.6.350.0030.01414.52
5.6.340.0060.00614.61
5.6.330.0060.00914.30
5.6.320.0030.00914.39
5.6.310.0080.00414.18
5.6.300.0070.00714.41
5.6.290.0070.00314.59
5.6.280.0050.03817.78
5.6.270.0140.00014.42
5.6.260.0060.03517.64
5.6.250.0130.03317.61
5.6.240.0030.05017.61
5.6.230.0070.03817.63
5.6.220.0050.04717.49
5.6.210.0080.02717.39
5.6.200.0080.02317.46
5.6.190.0090.02217.46
5.6.180.0050.04317.50
5.6.170.0020.03217.66
5.6.160.0080.04117.31
5.6.150.0120.03017.43
5.6.140.0070.03717.63
5.6.130.0050.04217.48
5.6.120.0060.04117.59
5.6.110.0080.03617.46
5.6.100.0050.04417.47
5.6.90.0060.02417.52
5.6.80.0040.03117.14
5.6.70.0060.02917.13
5.6.60.0070.04417.15
5.6.50.0030.03517.21
5.6.40.0050.04017.34
5.6.30.0080.04217.15
5.6.20.0020.02517.19
5.6.10.0080.02517.22
5.6.00.0060.04217.07
5.5.380.0100.04516.12
5.5.370.0070.04415.95
5.5.360.0070.03015.81
5.5.350.0020.04216.07
5.5.340.0020.04816.39
5.5.330.0070.02216.07
5.5.320.0080.02416.30
5.5.310.0050.04116.20
5.5.300.0050.03316.14
5.5.290.0050.04416.05
5.5.280.0090.04016.20
5.5.270.0080.04116.31
5.5.260.0040.03916.18
5.5.250.0080.02816.24
5.5.240.0070.04215.81
5.5.230.0100.04815.82
5.5.220.0050.04515.89
5.5.210.0080.04015.90
5.5.200.0070.03215.75
5.5.190.0070.04015.70
5.5.180.0070.03815.93
5.5.170.0030.00614.04
5.5.160.0030.03115.84
5.5.150.0020.03215.69
5.5.140.0030.04315.83
5.5.130.0080.03615.90
5.5.120.0070.04515.82
5.5.110.0080.02815.76
5.5.100.0050.02815.60
5.5.90.0130.03115.79
5.5.80.0110.03615.68
5.5.70.0130.03515.91
5.5.60.0080.02815.82
5.5.50.0050.02215.66
5.5.40.0030.02615.78
5.5.30.0040.02815.71
5.5.20.0050.02815.88
5.5.10.0030.03215.64
5.5.00.0050.02115.76
5.4.450.0030.04315.18
5.4.440.0060.04215.30
5.4.430.0050.04615.25
5.4.420.0020.04115.25
5.4.410.0100.02215.26
5.4.400.0120.03415.21
5.4.390.0040.04115.05
5.4.380.0100.03814.94
5.4.370.0050.04215.12
5.4.360.0080.03815.12
5.4.350.0070.03215.01
5.4.340.0020.02315.07
5.4.330.0040.00810.92
5.4.320.0070.03815.22
5.4.310.0060.03915.24
5.4.300.0050.03714.89
5.4.290.0100.03714.87
5.4.280.0050.04015.05
5.4.270.0100.03715.24
5.4.260.0030.04314.93
5.4.250.0030.03814.99
5.4.240.0030.04015.09
5.4.230.0020.04415.10
5.4.220.0080.02314.93
5.4.210.0110.02615.03
5.4.200.0100.01815.06
5.4.190.0080.04314.98
5.4.180.0020.02514.97
5.4.170.0100.03515.16
5.4.160.0020.02215.08
5.4.150.0060.01915.05
5.4.140.0040.02713.96
5.4.130.0070.03513.92
5.4.120.0070.03313.73
5.4.110.0070.03613.72
5.4.100.0130.03213.86
5.4.90.0080.03013.74
5.4.80.0050.03813.73
5.4.70.0030.03813.75
5.4.60.0070.03513.61
5.4.50.0050.04213.84
5.4.40.0050.02813.63
5.4.30.0070.03613.78
5.4.20.0080.03213.70
5.4.10.0050.04013.93
5.4.00.0080.03713.54
5.3.290.0080.03312.64
5.3.280.0050.03112.57
5.3.270.0050.03412.56
5.3.260.0070.03712.69
5.3.250.0050.02512.66
5.3.240.0040.02512.58
5.3.230.0020.02212.46
5.3.220.0090.01712.49
5.3.210.0050.02212.52
5.3.200.0030.04012.38
5.3.190.0020.04412.63
5.3.180.0070.03312.72
5.3.170.0050.04312.68
5.3.160.0050.02512.65
5.3.150.0020.03712.53
5.3.140.0030.04012.50
5.3.130.0050.02512.70
5.3.120.0070.04212.51
5.3.110.0050.01912.57
5.3.100.0060.03812.37
5.3.90.0050.01812.28
5.3.80.0020.02312.29
5.3.70.0000.04312.19
5.3.60.0030.03312.29
5.3.50.0080.03312.14
5.3.40.0040.02112.26
5.3.30.0040.03712.38
5.3.20.0020.02912.19
5.3.10.0050.03812.08
5.3.00.0050.03912.02
5.2.170.0030.07012.33
5.2.160.0070.05712.33
5.2.150.0070.06312.33
5.2.140.0100.05712.33
5.2.130.0130.05712.33
5.2.120.0070.04312.33
5.2.110.0070.05712.33
5.2.100.0070.05712.33
5.2.90.0100.05712.33
5.2.80.0100.05312.33
5.2.70.0100.05312.33
5.2.60.0070.06012.33
5.2.50.0100.05312.33
5.2.40.0000.04012.33
5.2.30.0030.05312.33
5.2.20.0030.04312.33
5.2.10.0070.05712.33
5.2.00.0000.05712.33
5.1.60.0070.05012.33
5.1.50.0000.05712.33
5.1.40.0070.05012.33
5.1.30.0000.04712.33
5.1.20.0000.06012.33
5.1.10.0030.05312.33
5.1.00.0070.05012.33
5.0.50.0070.04312.33
5.0.40.0000.04712.33
5.0.30.0070.06012.33
5.0.20.0030.04712.33
5.0.10.0030.03712.33
5.0.00.0100.05712.33
4.4.90.0000.03312.33
4.4.80.0000.03712.33
4.4.70.0000.03712.33
4.4.60.0030.01312.33
4.4.50.0000.01712.33
4.4.40.0000.03012.33
4.4.30.0070.03312.33
4.4.20.0000.03712.33
4.4.10.0070.02312.33
4.4.00.0000.06012.33
4.3.110.0000.03012.33
4.3.100.0030.01312.33
4.3.90.0000.02712.33
4.3.80.0070.04712.33
4.3.70.0030.03312.33
4.3.60.0100.02312.33
4.3.50.0100.03012.33
4.3.40.0100.04312.33
4.3.30.0030.02012.33
4.3.20.0000.03712.33
4.3.10.0030.03312.33
4.3.00.0000.03712.33

preferences:
52.12 ms | 401 KiB | 5 Q