3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyCounter extends Counter { public function printCounterInfo() { printf("Counter's name is '%s' and is%s persistent. Its current value is %d.\n", $this->getMeta(COUNTER_META_NAME), $this->getMeta(COUNTER_META_IS_PERSISTENT) ? '' : ' not', $this->value); } } Counter::setCounterClass("MyCounter"); if (($counter_one = Counter::getNamed("one")) === NULL) { $counter_one = new Counter("one", 0, COUNTER_FLAG_PERSIST); } $counter_one->bumpValue(2); // we aren't allowed to "set" the value directly $counter_two = new Counter("two", 5); $counter_three = Counter::getNamed("three"); $counter_four = new Counter("four", 2, COUNTER_FLAG_PERSIST | COUNTER_FLAG_SAVE | COUNTER_FLAG_NO_OVERWRITE); $counter_four->bumpValue(1); $counter_one->printCounterInfo(); $counter_two->printCounterInfo(); $counter_three->printCounterInfo(); $counter_four->printCounterInfo(); ?>

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.0140.00716.63
8.3.50.0140.00016.29
8.3.40.0070.00718.98
8.3.30.0100.00318.71
8.3.20.0080.00020.30
8.3.10.0000.00823.65
8.3.00.0040.00422.52
8.2.180.0120.00916.73
8.2.170.0030.01222.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0060.00317.50
8.2.110.0060.00320.43
8.2.100.0040.01117.65
8.2.90.0050.00219.08
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0030.00717.90
8.2.50.0060.00318.07
8.2.40.0080.00021.00
8.2.30.0000.00718.19
8.2.20.0080.00017.82
8.2.10.0000.00818.07
8.2.00.0000.00818.09
8.1.280.0140.00025.92
8.1.270.0000.00820.42
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00621.99
8.1.230.0090.00320.89
8.1.220.0040.00418.56
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0050.00317.23
8.1.180.0000.00718.10
8.1.170.0080.00018.65
8.1.160.0000.01023.68
8.1.150.0080.00018.76
8.1.140.0060.00317.41
8.1.130.0080.00017.67
8.1.120.0040.00417.38
8.1.110.0000.00717.46
8.1.100.0040.00317.27
8.1.90.0000.00717.40
8.1.80.0050.00317.42
8.1.70.0040.00417.44
8.1.60.0050.00317.54
8.1.50.0090.00017.49
8.1.40.0000.00817.46
8.1.30.0050.00317.62
8.1.20.0020.00517.48
8.1.10.0000.00817.54
8.1.00.0040.00417.46
8.0.300.0000.00918.77
8.0.290.0000.00716.75
8.0.280.0040.00418.34
8.0.270.0030.00317.25
8.0.260.0000.00817.29
8.0.250.0040.00417.08
8.0.240.0050.00317.06
8.0.230.0030.00316.94
8.0.220.0070.00016.97
8.0.210.0040.00417.01
8.0.200.0070.00016.93
8.0.190.0040.00416.93
8.0.180.0000.00816.96
8.0.170.0050.00216.87
8.0.160.0040.00416.99
8.0.150.0030.00516.93
8.0.140.0030.00517.00
8.0.130.0030.00313.34
8.0.120.0080.00016.83
8.0.110.0070.00016.80
8.0.100.0050.00216.86
8.0.90.0040.00416.82
8.0.80.0120.00916.95
8.0.70.0070.00016.77
8.0.60.0000.00716.89
8.0.50.0040.00416.98
8.0.30.0140.00417.06
8.0.20.0120.00817.40
8.0.10.0000.00816.91
8.0.00.0130.00916.69
7.4.330.0000.00715.08
7.4.320.0000.00616.47
7.4.300.0000.00616.57
7.4.290.0000.00716.49
7.4.280.0000.00716.46
7.4.270.0040.00416.60
7.4.260.0030.00316.46
7.4.250.0000.00816.45
7.4.240.0020.00616.51
7.4.230.0000.00716.40
7.4.220.0140.00916.56
7.4.210.0180.00416.44
7.4.200.0000.00716.63
7.4.160.0090.01216.55
7.4.150.0120.00617.40
7.4.140.0130.00917.86
7.4.130.0100.00716.68
7.4.120.0120.00516.57
7.4.110.0100.01016.52
7.4.100.0060.01216.50
7.4.90.0040.01516.65
7.4.80.0130.01019.39
7.4.70.0140.00316.74
7.4.60.0070.01116.52
7.4.50.0000.00416.58
7.4.40.0090.00916.56
7.4.30.0120.00616.75
7.4.00.0060.00914.94
7.3.330.0030.00313.41
7.3.320.0020.00213.34
7.3.310.0030.00316.23
7.3.300.0000.00716.19
7.3.290.0080.00716.32
7.3.280.0090.00916.37
7.3.270.0140.00317.40
7.3.260.0130.01016.46
7.3.250.0140.00816.51
7.3.240.0060.01616.47
7.3.230.0140.00916.54
7.3.210.0070.01116.44
7.3.200.0110.00519.39
7.3.190.0160.00016.64
7.3.180.0130.00316.48
7.3.170.0030.01416.50
7.3.160.0070.01116.33
7.3.10.0080.00816.62
7.3.00.0080.00816.74
7.2.330.0090.00916.61
7.2.320.0090.00916.61
7.2.310.0070.01016.41
7.2.300.0120.00916.59
7.2.290.0130.00316.61
7.2.130.0030.00916.56
7.2.120.0030.00616.93
7.2.110.0320.00515.63
7.2.100.0370.00315.56
7.2.90.0390.00515.71
7.2.80.0350.01315.74
7.2.70.0330.00915.85
7.2.60.0270.00715.79
7.2.50.0330.00515.87
7.2.40.0410.01015.71
7.2.30.0290.00915.79
7.2.20.0420.00515.82
7.2.10.0490.00715.68
7.2.00.0350.01216.94
7.1.250.0060.00615.52
7.1.230.0610.00313.53
7.1.220.0580.00713.75
7.1.210.0610.01213.63
7.1.200.0410.00814.61
7.1.190.0640.00313.52
7.1.180.0670.00713.37
7.1.170.0710.00313.43
7.1.160.0640.01313.58
7.1.150.0870.00613.70
7.1.140.0790.00713.22
7.1.130.0850.01013.59
7.1.120.0610.00713.82
7.1.110.0690.00913.64
7.1.100.0230.01115.82
7.1.90.0500.00613.94
7.1.80.0330.00713.66
7.1.70.0150.00815.44
7.1.60.0300.00825.90
7.1.50.0280.01324.32
7.1.40.0420.01131.71
7.1.30.0420.01131.84
7.1.20.0470.00831.98
7.1.10.0220.01113.65
7.1.00.0130.04217.97
7.0.310.0700.00713.47
7.0.300.0950.00313.70
7.0.290.0570.01013.46
7.0.280.0520.00913.04
7.0.270.0790.01213.49
7.0.260.0510.00913.23
7.0.250.0430.01513.41
7.0.240.0900.00613.37
7.0.230.0370.00413.53
7.0.220.0360.01213.75
7.0.210.0320.00013.62
7.0.200.0350.00714.08
7.0.190.0360.01313.41
7.0.180.0430.00713.43
7.0.170.0230.00813.31
7.0.160.0360.00713.56
7.0.150.0260.00613.48
7.0.140.0170.01713.26
7.0.130.0320.00413.38
7.0.120.0290.00613.42
7.0.110.0220.00913.20
7.0.100.0350.00313.75
7.0.90.0270.00313.47
7.0.80.0130.01913.36
7.0.70.0310.00413.51
7.0.60.0150.02316.87
7.0.50.0190.02915.64
7.0.40.0200.03616.96
7.0.30.0260.04316.92
7.0.20.0270.02616.72
7.0.10.0210.04216.89
7.0.00.0130.02816.86
5.6.380.0110.00714.13
5.6.370.0140.00814.05
5.6.360.0080.01214.41
5.6.350.0110.01114.13
5.6.340.0140.00714.21
5.6.330.0100.01114.20
5.6.320.0180.00514.16
5.6.310.0130.00614.29
5.6.300.0090.01214.29
5.6.290.0220.00314.05
5.6.280.0060.02317.35
5.6.270.0120.00814.41
5.6.260.0130.00814.01
5.6.250.0140.00714.25
5.6.240.0090.00913.94
5.6.230.0140.00514.33
5.6.220.0150.00614.13
5.6.210.0100.04917.30
5.6.200.0080.04216.17
5.6.190.0080.02817.58
5.6.180.0240.04017.44
5.6.170.0260.04017.26
5.6.160.0070.02517.21
5.6.150.0140.02016.09
5.6.140.0090.04116.22
5.6.130.0110.03816.22
5.6.120.0120.02017.73
5.6.110.0130.02817.45
5.6.100.0120.04617.50
5.6.90.0120.04517.58
5.6.80.0170.03517.06
5.6.70.1750.01917.30
5.6.60.0160.00314.19
5.6.50.0160.00214.00
5.6.40.0140.00614.14
5.6.30.0140.01014.09
5.6.20.0210.00513.93
5.6.10.0220.00013.91
5.6.00.0120.00714.15
5.5.380.0070.00711.29
5.5.370.0100.00211.29
5.5.360.0040.01211.29
5.5.350.0110.04215.85
5.5.340.0070.04514.69
5.5.330.0140.02515.78
5.5.320.0200.04415.81
5.5.310.0220.02715.79
5.5.300.0080.02314.66
5.5.290.0070.04714.66
5.5.280.0060.04816.12
5.5.270.0100.02116.09
5.5.260.0050.02416.13
5.5.250.0100.03015.92
5.5.240.0140.03615.74
5.5.230.0070.00711.29
5.5.220.0080.00411.29
5.5.210.0120.00211.29
5.5.200.0140.00011.29
5.5.190.0030.00911.29
5.5.180.0090.00611.29
5.5.170.0160.00413.96
5.5.160.0110.00411.29
5.5.150.0120.00011.29
5.5.140.0130.00011.29
5.5.130.0140.00011.29
5.5.120.0140.00411.29
5.5.110.0120.00611.29
5.5.100.0080.00711.29
5.5.90.0050.01011.29
5.5.80.0160.00011.29
5.5.70.0080.00911.29
5.5.60.0150.00011.29
5.5.50.0090.00311.29
5.5.40.0120.00011.29
5.5.30.0060.00911.29
5.5.20.0100.00311.29
5.5.10.0100.00511.29
5.5.00.0100.00711.29
5.4.450.0500.02515.32
5.4.440.0470.03115.31
5.4.430.0520.03315.44
5.4.420.0480.02315.43
5.4.410.0320.04015.24
5.4.400.0480.02515.29
5.4.390.0360.03415.33
5.4.380.0360.02815.15
5.4.370.0360.03015.22
5.4.360.0480.02215.13
5.4.350.0400.02815.29
5.4.340.0410.03315.12
5.4.330.0150.00011.29
5.4.320.0370.03215.22
5.4.310.0370.02915.17
5.4.300.0430.02315.28
5.4.290.0400.02615.28
5.4.280.0400.02715.08
5.4.270.0390.02915.15
5.4.260.0370.03515.13
5.4.250.0440.03115.06
5.4.240.0350.02815.07
5.4.230.0460.03215.27
5.4.220.0380.03315.27
5.4.210.0370.03415.26
5.4.200.0400.02814.03
5.4.190.0520.02515.24
5.4.180.0420.02615.14
5.4.170.0520.03715.22
5.4.160.0420.02215.26
5.4.150.0370.03015.15
5.4.140.0380.03513.84
5.4.130.0470.03413.90
5.4.120.0430.02713.81
5.4.110.0400.03313.80
5.4.100.0410.03313.81
5.4.90.0440.02713.86
5.4.80.0450.02813.92
5.4.70.0370.03413.83
5.4.60.0090.03413.91
5.4.50.0030.02913.91
5.4.40.0090.02313.91
5.4.30.0210.03013.89
5.4.20.0210.02913.83
5.4.10.0070.00711.29
5.4.00.0130.00611.29

preferences:
40.49 ms | 400 KiB | 5 Q