3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pathauto_entity_load($entities, $type) { static $drupal_static_fast; if (!isset($drupal_static_fast)) { $drupal_static_fast['faster'] = &drupal_static(__FUNCTION__); } $path_auto_entity_types = &$drupal_static_fast['faster']; // Save the entity types used statically to avoid unnessasary queries later. if (!isset($path_auto_entity_types)) { print "Database Called\n"; $path_auto_entity_types = array('node', 'taxonomy_term'); } // We aren't storing state for this type at the moment. if (!isset($path_auto_entity_types[$type])) { return; } $states = pathauto_entity_state_load_multiple($type, array_keys($entities)); foreach ($states as $id => $state) { if (!isset($entities[$id]->path['pathauto'])) { if (!isset($entities[$id]->path) || !is_array($entities[$id]->path)) { $entities[$id]->path = array(); } $entities[$id]->path['pathauto'] = $state; } } } pathauto_entity_load(array( 15518,15519,15542,15551,), 'node'); pathauto_entity_load(array( 15518,15519,15542,15551,), 'taxonomy_term'); pathauto_entity_load(array( 15518,15519,15542,15551,), 'fake'); function pathauto_entity_state_load_multiple($type, $entites) { print "states loaded\n"; return array( 15518 => 1, 15519 => 1, 15542 => 1, 15551 => 0, ); } // Copied from D7. function &drupal_static($name, $default_value = NULL, $reset = FALSE) { print "drupal_static() called\n"; static $data = array(), $default = array(); // First check if dealing with a previously defined static variable. if (isset($data [$name]) || array_key_exists($name, $data)) { // Non-NULL $name and both $data[$name] and $default[$name] statics exist. if ($reset) { // Reset pre-existing static variable to its default value. $data [$name] = $default [$name]; } return $data [$name]; } // Neither $data[$name] nor $default[$name] static variables exist. if (isset($name)) { if ($reset) { // Reset was called before a default is set and yet a variable must be // returned. return $data; } // First call with new non-NULL $name. Initialize a new static variable. $default [$name] = $data [$name] = $default_value; return $data [$name]; } // Reset all: ($name == NULL). This needs to be done one at a time so that // references returned by earlier invocations of drupal_static() also get // reset. foreach ($default as $name => $value) { $data [$name] = $value; } // As the function returns a reference, the return should always be a // variable. return $data; }

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.4.130.0090.00617.85
8.4.120.0130.00823.99
8.4.110.0070.00323.30
8.4.100.0130.00718.91
8.4.90.0080.01218.79
8.4.80.0080.00418.82
8.4.70.0110.00817.99
8.4.60.0130.00518.88
8.4.50.0050.00620.36
8.4.40.0060.01317.68
8.4.30.0030.01317.62
8.4.20.0130.00717.86
8.4.10.0090.00017.79
8.3.260.0100.01016.68
8.3.250.0040.00518.81
8.3.240.0110.00917.06
8.3.230.0110.00917.42
8.3.220.0020.00618.81
8.3.210.0110.00816.65
8.3.200.0080.00116.61
8.3.190.0090.01117.32
8.3.180.0100.00816.50
8.3.170.0070.01117.44
8.3.160.0140.00416.70
8.3.150.0150.00320.68
8.3.140.0030.00617.03
8.3.130.0040.00418.51
8.3.120.0030.00618.91
8.3.110.0060.00320.94
8.3.100.0100.00024.06
8.3.90.0080.00026.77
8.3.80.0100.00018.20
8.3.70.0090.00618.55
8.3.60.0070.01318.31
8.3.50.0170.00221.09
8.3.40.0110.00718.73
8.3.30.0100.00319.17
8.3.20.0070.00020.08
8.3.10.0040.00423.58
8.3.00.0060.00317.75
8.2.290.0060.00220.68
8.2.280.0100.01018.63
8.2.270.0130.00617.50
8.2.260.0080.01116.62
8.2.250.0090.00016.49
8.2.240.0080.00017.26
8.2.230.0090.00622.58
8.2.220.0040.00437.54
8.2.210.0030.00626.77
8.2.200.0030.00618.16
8.2.190.0090.00618.16
8.2.180.0090.00918.54
8.2.170.0140.00018.86
8.2.160.0160.00322.96
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00819.39
8.2.110.0060.00319.30
8.2.100.0040.00817.75
8.2.90.0060.00319.34
8.2.80.0030.00517.97
8.2.70.0050.00517.63
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0000.00819.89
8.2.30.0040.00418.20
8.2.20.0030.00617.71
8.2.10.0040.00418.16
8.2.00.0040.00418.01
8.1.330.0160.00622.14
8.1.320.0100.00918.75
8.1.310.0040.00418.25
8.1.300.0080.00018.52
8.1.290.0060.00330.84
8.1.280.0170.00325.92
8.1.270.0130.00323.91
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00923.83
8.1.230.0100.00317.66
8.1.220.0050.00317.76
8.1.210.0040.00418.77
8.1.200.0080.00017.36
8.1.190.0080.00017.23
8.1.180.0060.00318.10
8.1.170.0000.00820.29
8.1.160.0000.00722.02
8.1.150.0030.00518.82
8.1.140.0000.00717.46
8.1.130.0040.00417.84
8.1.120.0040.00417.51
8.1.110.0070.00017.43
8.1.100.0040.00417.37
8.1.90.0040.00417.45
8.1.80.0000.00817.47
8.1.70.0030.00317.45
8.1.60.0080.00017.55
8.1.50.0020.00717.43
8.1.40.0040.00417.54
8.1.30.0000.00817.59
8.1.20.0000.00717.69
8.1.10.0000.00817.59
8.1.00.0040.00417.59
8.0.300.0060.00318.77
8.0.290.0000.00716.63
8.0.280.0050.00218.36
8.0.270.0000.00717.33
8.0.260.0030.00317.31
8.0.250.0070.00016.86
8.0.240.0050.00216.86
8.0.230.0030.00316.99
8.0.220.0000.00716.79
8.0.210.0070.00016.87
8.0.200.0040.00416.96
8.0.190.0000.01116.99
8.0.180.0000.00716.86
8.0.170.0000.00816.81
8.0.160.0030.00516.81
8.0.150.0040.00416.86
8.0.140.0000.00816.87
8.0.130.0000.00513.33
8.0.120.0030.00516.78
8.0.110.0040.00416.96
8.0.100.0070.00016.86
8.0.90.0040.00416.96
8.0.80.0070.00716.90
8.0.70.0000.00716.90
8.0.60.0050.00316.96
8.0.50.0040.00416.89
8.0.30.0140.00817.00
8.0.20.0060.01317.44
8.0.10.0050.00316.92
8.0.00.0090.00816.95
7.4.330.0030.00315.03
7.4.320.0060.00016.52
7.4.300.0040.00416.62
7.4.290.0040.00416.43
7.4.280.0070.00016.54
7.4.270.0030.00316.55
7.4.260.0080.00016.55
7.4.250.0030.00516.57
7.4.240.0020.00616.53
7.4.230.0030.00316.71
7.4.220.0100.01016.66
7.4.210.0090.00616.64
7.4.200.0030.00316.68
7.4.160.0060.00916.64
7.4.150.0080.01117.40
7.4.140.0110.01117.86
7.4.130.0110.01016.63
7.4.120.0100.00716.54
7.4.110.0070.01116.45
7.4.100.0080.01116.47
7.4.90.0120.00516.51
7.4.80.0150.00919.39
7.4.70.0140.00416.45
7.4.60.0100.00616.50
7.4.50.0000.00816.54
7.4.40.0060.01516.67
7.4.30.0100.00716.58
7.4.00.0070.00715.11
7.3.330.0030.00313.26
7.3.320.0090.00613.40
7.3.310.0040.00416.37
7.3.300.0000.00716.42
7.3.290.0070.00016.39
7.3.280.0080.00916.34
7.3.270.0080.00817.40
7.3.260.0170.00016.65
7.3.250.0100.00716.64
7.3.240.0100.00716.67
7.3.230.0000.01916.66
7.3.210.0100.00916.41
7.3.200.0070.01419.39
7.3.190.0110.01116.53
7.3.180.0060.00916.53
7.3.170.0070.01416.39
7.3.160.0090.01516.39
7.2.330.0110.00616.39
7.2.320.0000.01716.69
7.2.310.0090.00616.46
7.2.300.0060.01216.73
7.2.290.0080.01416.43
7.2.60.0060.00617.06
7.1.200.0070.00715.47
7.1.70.0000.00717.28
7.1.60.0060.01819.50
7.1.50.0100.01416.70
7.1.00.0070.07322.45
7.0.200.0040.00416.70
7.0.60.0070.05320.11
7.0.50.0070.05017.81
7.0.40.0100.03720.24
7.0.30.0230.08720.15
7.0.20.0370.04020.08
7.0.10.0200.07720.15
7.0.00.0130.04320.32
5.6.280.0030.07321.01
5.6.210.0030.06720.52
5.6.200.0000.09318.22
5.6.190.0170.05720.48
5.6.180.3570.04720.48
5.6.170.0330.07320.62
5.6.160.0070.05720.54
5.6.150.0070.08318.25
5.6.140.0070.04318.18
5.6.130.0100.03718.14
5.6.120.0100.06721.14
5.6.110.0100.07020.99
5.6.100.0070.04320.98
5.6.90.0100.04021.02
5.6.80.0030.04020.40
5.5.350.0470.06320.30
5.5.340.0000.07317.94
5.5.330.0000.05020.27
5.5.320.0400.06320.36
5.5.310.0270.07720.24
5.5.300.0170.07018.03
5.5.290.0030.04017.96
5.5.280.0000.04320.88
5.5.270.0070.04720.77
5.5.260.0100.06020.97
5.5.250.0100.08020.71
5.5.240.0070.06320.04
5.4.450.0670.04719.54
5.4.440.0200.04319.19
5.4.430.0230.04019.40
5.4.420.0100.05719.53
5.4.410.0070.05718.86
5.4.400.0100.05318.51
5.4.390.0030.06018.80
5.4.380.0130.05018.59
5.4.370.0070.05318.79
5.4.360.0130.04718.80
5.4.350.0200.04718.82
5.4.340.0030.06018.74
5.4.320.0130.05318.70
5.4.310.0100.05718.71
5.4.300.0000.06318.80
5.4.290.0070.05318.62
5.4.280.0100.05318.78
5.4.270.0030.06718.75
5.4.260.0070.06318.85
5.4.250.0170.05018.78
5.4.240.0030.06318.78
5.4.230.0100.05318.73
5.4.220.0100.07018.47
5.4.210.0130.05018.56
5.4.200.0130.04716.71
5.4.190.0000.06718.73
5.4.180.0100.05318.77
5.4.170.0100.05318.46
5.4.160.0200.04318.73
5.4.150.0230.04018.76
5.4.140.0170.04316.28
5.4.130.0170.04316.34
5.4.120.0170.04016.31
5.4.110.0170.04016.29
5.4.100.0130.04716.34
5.4.90.0070.05316.29
5.4.80.0170.05316.23
5.4.70.0070.05316.16
5.4.60.0070.05716.43
5.4.50.0030.05316.25
5.4.40.0070.05716.29
5.4.30.0070.05016.23
5.4.20.0030.05716.27
5.4.10.0070.05016.29
5.4.00.0130.04315.75
5.3.290.0170.05714.69
5.3.280.0100.05314.75
5.3.270.0130.05014.84
5.3.260.0070.05714.83
5.3.250.0030.06014.61
5.3.240.0070.05314.75
5.3.230.0100.05314.84
5.3.220.0170.04714.70
5.3.210.0100.05314.59
5.3.200.0030.05714.65
5.3.190.0100.05314.73
5.3.180.0100.05314.60
5.3.170.0070.05314.64
5.3.160.0100.05314.79
5.3.150.0030.05714.63
5.3.140.0070.05314.75
5.3.130.0030.06314.61
5.3.120.0170.04714.59
5.3.110.0070.05714.57
5.3.100.0130.04714.22
5.3.90.0130.04714.22
5.3.80.0100.05014.14
5.3.70.0030.05714.24
5.3.60.0070.05714.25
5.3.50.0030.05713.97
5.3.40.0070.05314.02
5.3.30.0200.03714.04
5.3.20.0170.04313.77
5.3.10.0030.05713.66
5.3.00.0170.04313.78
5.2.170.0100.05011.29
5.2.160.0100.03711.17
5.2.150.0030.04311.38
5.2.140.0030.04311.20
5.2.130.0100.03711.13
5.2.120.0100.03711.25
5.2.110.0100.04011.35
5.2.100.0100.04011.25
5.2.90.0130.03711.18
5.2.80.0070.05011.32
5.2.70.0030.04711.15
5.2.60.0070.04311.10
5.2.50.0030.05711.07
5.2.40.0100.03711.06
5.2.30.0100.04011.10
5.2.20.0000.04711.11
5.2.10.0030.04310.98
5.2.00.0000.04710.96
5.1.60.0070.03310.05
5.1.50.0070.03310.21
5.1.40.0130.04010.11
5.1.30.0200.04010.46
5.1.20.0130.04710.56
5.1.10.0070.05010.30
5.1.00.0030.05310.10
5.0.50.0130.0308.63
5.0.40.0070.0308.54
5.0.30.0000.0538.25
5.0.20.0070.0378.41
5.0.10.0100.0338.39
5.0.00.0130.0478.39
4.4.90.0000.0236.02
4.4.80.0030.0235.96
4.4.70.0000.0335.97
4.4.60.0030.0235.91
4.4.50.0130.0135.93
4.4.40.0030.0375.96
4.4.30.0070.0205.96
4.4.20.0070.0206.06
4.4.10.0100.0176.00
4.4.00.0070.0335.96
4.3.110.0030.0275.84
4.3.100.0130.0105.87
4.3.90.0030.0235.87
4.3.80.0030.0335.87
4.3.70.0070.0205.95
4.3.60.0070.0275.85
4.3.50.0000.0275.93
4.3.40.0000.0475.86
4.3.30.0000.0304.67
4.3.20.0000.0304.61
4.3.10.0000.0304.63
4.3.00.0030.01315.79

preferences:
163.37 ms | 403 KiB | 5 Q